Competitive Programming Solutions

GitHub
back to dashboard

K. Max Number

Codeforces - Sheet #7 (Recursion) · limit: 1s · memory: 64MB · view on codeforces

input

5
1 -3 5 4 -6

output

5
Main.java
static void solve() {

        // Write your solution here
        int n = in.nextInt();
        int[] a = readIntArray(n);

        out.println(max(a, 0));
    }