Read an array of integers and print the sum of all its elements.
Input / Output
Input: first line N, second line N space-separated integers. Output: the sum of all N integers.
Examples
Input
4 1 2 3 4
Expected Output
10
Input
3 -5 5 10
Expected Output
10
+ 2 hidden tests checked on Submit.
Main.java is the entry point. Add extra classes for OOP exercises — they compile together.
Run your code to see test results here.