Created
January 10, 2016 04:43
-
-
Save erikgunawan/6f76d3d2ab3d2031f934 to your computer and use it in GitHub Desktop.
[HackerRank Solutions] Warmup – A Very Big Sum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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