Skip to content

Instantly share code, notes, and snippets.

@erikgunawan
Created January 10, 2016 04:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikgunawan/6f76d3d2ab3d2031f934 to your computer and use it in GitHub Desktop.
Save erikgunawan/6f76d3d2ab3d2031f934 to your computer and use it in GitHub Desktop.
[HackerRank Solutions] Warmup – A Very Big Sum
import java.util.Scanner;
/*
* HackerRank Warmup - A Very Big Sum
* @author Erik Gunawan
*/
public class VeryBigSum {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
if (N>=1 && N<=10) {
long result = 0;
for (int i=0; i<N; i++) {
result += in.nextLong();
}
System.out.println(result);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment