Skip to content

Commit 7083df6

Browse files
a very big sum
1 parent 65df4d4 commit 7083df6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/warmup/AVeryBigSum.java

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package warmup;
2+
3+
import java.util.Arrays;
4+
import java.util.Scanner;
5+
6+
public class AVeryBigSum {
7+
public static void main(String[] args) {
8+
Scanner scanner = new Scanner(System.in);
9+
int length = scanner.nextInt();
10+
long[] array = new long[length];
11+
for (int index = 0 ; index < array.length ; index++) {
12+
array[index] = scanner.nextLong();
13+
}
14+
System.out.println(Arrays.stream(array).sum());
15+
}
16+
}

0 commit comments

Comments
 (0)