The condition that you should display maximum of N numbers, is not matched. But output looks correct.
I can't find where is the problem..
package com.codegym.task.task05.task0532;
import java.io.*;
/*
Task about algorithms
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt( reader.readLine());
int maximum = 0;
if (n>0){
int [] array= new int [n];
for (int i=0; i<n; i++){
array [i]=Integer.parseInt(reader.readLine());
if (array [i]>=maximum)
maximum=array [i];
}
//write your code here
System.out.println(maximum);
}
}
}