Никакому условию не противоречу...
Что от меня хочет валидатор?
Подскажите пожалуйста.
package com.javarush.task.task05.task0532;
import java.io.*;
/*
Задача по алгоритмам
*/
public class Solution {
public static void main(String[] args) throws Exception {
int N =0;
int a =0;
int b =0;
int maximum = 0;
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
//напишите тут ваш код
while (N <= 0) {
N = Integer.parseInt(reader.readLine());
}
if (N == 1){maximum = Integer.parseInt(reader.readLine());}
while (a != N-1){
b = Integer.parseInt(reader.readLine());
if (a == 0) {
maximum = Integer.parseInt(reader.readLine());
}
else {
maximum = maximum > b ? maximum : b;
}
a++;
}
System.out.println(maximum);
}
}