fork download
  1. import java.util.Scanner;
  2.  
  3. class Ideone
  4. {
  5. public static void main (String[] args) throws java.lang.Exception
  6. {
  7. Scanner scanner = new Scanner(System.in);
  8. long a, sum = 0;
  9. while (scanner.hasNext()){
  10. a = scanner.nextLong();
  11. sum += a;
  12. }
  13. System.out.println (sum);
  14. }
  15. }
Success #stdin #stdout 0.06s 2184192KB
stdin
Standard input is empty
stdout
0