(String[]args)
| 2 | class Solution |
| 3 | { |
| 4 | public static void main (String[]args) |
| 5 | { |
| 6 | Scanner sc = new Scanner (System.in); |
| 7 | int t = sc.nextInt (); |
| 8 | int e[] = new int[t]; |
| 9 | int l[] = new int[t]; |
| 10 | |
| 11 | for (int i = 0; i < t; i++) |
| 12 | e[i] = sc.nextInt (); |
| 13 | |
| 14 | for (int i = 0; i < t; i++) |
| 15 | l[i] = sc.nextInt (); |
| 16 | |
| 17 | int max = 0, sum = 0; |
| 18 | for (int i = 0; i < t; i++) |
| 19 | { |
| 20 | sum += e[i] - l[i]; |
| 21 | max = Math.max (sum, max); |
| 22 | } |
| 23 | System.out.println (max); |
| 24 | } |
| 25 | } |
nothing calls this directly
no outgoing calls
no test coverage detected