fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12.  
  13. Scanner sc = new Scanner(System.in);
  14.  
  15. int num = sc.nextInt();
  16. int a[]=new int[num];
  17. int b[]=new int[num];
  18. for(int c=0;c<num;c++)
  19. {
  20. a[c] = sc.nextInt();
  21. b[c]= sc.nextInt();
  22.  
  23. }
  24. for(int c=0;c<num;c++ )
  25. {
  26. int sum =a[c]+b[c];
  27. int k =c+1;
  28. System.out.println("Case"+k);
  29. System.out.println(a[c]+" + "+b[c]+" = "+sum);
  30. }
  31. }
  32. }
  33.  
  34.  
Runtime error #stdin #stdout #stderr 0.1s 4386816KB
stdin
112233445566778899     
998877665544332211
stdout
Standard output is empty
stderr
Exception in thread "main" java.util.InputMismatchException: For input string: "112233445566778899"
	at java.util.Scanner.nextInt(Scanner.java:2123)
	at java.util.Scanner.nextInt(Scanner.java:2076)
	at Ideone.main(Main.java:15)