В чеи дело? В ide в консоль выводит. Тут же валидатор не пускает по пункту - байты с мах числом повторений должны выводится в консоль
package com.javarush.task.task18.task1803;
import java.io.*;
import java.util.*;
/*
Самые частые байты
*/
public class Solution {
public static void main(String[] args) throws FileNotFoundException, IOException{
BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
FileInputStream reader=new FileInputStream(input.readLine());
Map<Integer,Integer>map=new HashMap<>();
int maxRepeat=0, countRepeat=0;
while(reader.available()>0){
int b=reader.read();
int count=0;
while (reader.available()>0){
if (b==reader.read()){count++;}
}
if(countRepeat<count){countRepeat=count;maxRepeat=b;}
}
map.put(maxRepeat, countRepeat);
while(reader.available()>0){
int b=reader.read();
int count=0;
while (reader.available()>0){
if (b==reader.read()){count++;}
}
if(countRepeat==count&&!map.containsKey(b)){map.put(b, count);}
}
for (Map.Entry<Integer, Integer>pair:map.entrySet()){
System.out.println(pair.getKey()+" ");
}
input.close(); reader.close();
}
}