Skip to content

Commit

Permalink
Merge pull request #1 from AmdHamdani/patch
Browse files Browse the repository at this point in the history
Adding a very big sum solution in java
  • Loading branch information
noodle-eater authored Oct 20, 2016
2 parents a377665 + d5ccec3 commit 14fe35c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions AVeryBigSum/AVeryBigSum.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import java.util.Scanner;

public class AVeryBigSum {

public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();

long sum = 0;
for(int i = 0; i < n; i++)
sum += in.nextLong();

System.out.println(sum);
}
}

0 comments on commit 14fe35c

Please sign in to comment.