Консоль выводит верный ответ, в порядке убывания. пробовал с разными вариантами вводимой последовательности, все правильно сортирует, но не проходит проверку.
package com.javarush.task.task04.task0420;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Сортировка трех чисел
*/
public class Solution {
public static void main(String[] args) throws Exception {
//напишите тут ваш код
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String a1 = reader.readLine();
String b1 = reader.readLine();
String c1 = reader.readLine();
int a = Integer.parseInt(a1);
int b = Integer.parseInt(b1);
int c = Integer.parseInt(c1);
int array [] = new int [3];
array [0] = a;
array [1] = b;
array [2] = c;
for(int i = 2 ; i >= 0 ; i--){
for(int j = 0 ; j < i ; j++){
if( array[j] < array[j+1] ){
int t = array[i];
array[i] = array[j];
array[j] = t;
}
}
}
for (int i = 0; i < 3; i++)
System.out.print(array [i] + " ");
}
}