Output is fine but this app dasn't accepted it
package pl.codegym.task.task05.task0532;
import java.io.*;
import java.util.*;
/*
Zadanie z algorytmami
*/
public class Solution {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
//tutaj wpisz swój kod
if(n <= 0){
return;
}
int [] arr = new int[n];
int max = arr[0];
for(int i = 0; i<n; i++){
arr[i] = sc.nextInt();
}
for(int x : arr){
if(x>max){
max = x;
}
}
System.out.println(max);
}
}