fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. // IT IS IMPORTANT THAT YOUR CLASS HAS THE NAME PROG!
  6. class prog
  7. {
  8. public static void main (String[] args) throws java.lang.Exception
  9. {
  10. Scanner scanner = new Scanner(System.in);
  11. int a = scanner.nextInt();
  12. int b = scanner.nextInt();
  13. System.out.println(a+b);
  14. }
  15. }
Runtime error #stdin #stdout #stderr 0.1s 380672KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Exception in thread "main" java.util.NoSuchElementException
	at java.util.Scanner.throwFor(Scanner.java:907)
	at java.util.Scanner.next(Scanner.java:1530)
	at java.util.Scanner.nextInt(Scanner.java:2160)
	at java.util.Scanner.nextInt(Scanner.java:2119)
	at prog.main(Main.java:11)