Skip to content

Commit

Permalink
Merge pull request #11 from AmdHamdani/master
Browse files Browse the repository at this point in the history
Adding solution for a very big sum in Java
  • Loading branch information
ehotinger authored Oct 25, 2016
2 parents a1b9375 + 14fe35c commit f068191
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 f068191

Please sign in to comment.