В чем может быть ошибка? вроде пробовал разные писать цифры и всегда нужная выводилась. Но проверка не пропускает.
package com.javarush.task.task04.task0441;
/*
Как-то средненько
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int a1 = Integer.parseInt(reader.readLine());
int a2 = Integer.parseInt(reader.readLine());
int a3 = Integer.parseInt(reader.readLine());
int b = chekData(a1,a2,a3);
System.out.println(b);
}
public static int chekData (int a,int b, int c){
if (a < b && b < c) return b;
if (a < c && c < b) return c;
if (c < a && a < b) return a;
if (c == a && a == b) return b;
if (c == a && a != b) return a;
if (c == b && b != a) return c;
if (a == b && b != c) return a;
return 0;
}
}