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. // your code goes here
  13. }
  14. }import java.util.*;
  15. import java.lang.*;
  16. import java.io.*;
  17.  
  18. class Main {
  19.  
  20. public static void main (String[] args) throws java.lang.Exception {
  21.  
  22. Scanner scanner = new Scanner(System.in);
  23. int a = scanner.nextInt();
  24. int b = scanner.nextInt();
  25. int c = scanner.nextInt();
  26. int result;
  27.  
  28. /*if (a == b && b == c && a == c) {
  29. System.out.print(1);
  30. }
  31. else if (a == b || b == c || a == c) {
  32. System.out.print(2);
  33. }
  34. else {
  35. System.out.print(3);
  36. }*/
  37.  
  38. result = (a == b && b == c && a == c) ? 1 : (a == b || b == c || a == c) ? 2 : 3;
  39.  
  40. System.out.print(result);
  41.  
  42. }
  43. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:14: error: class, interface, or enum expected
}import java.util.*;
 ^
Main.java:15: error: class, interface, or enum expected
import java.lang.*;
^
Main.java:16: error: class, interface, or enum expected
import java.io.*;
^
3 errors
stdout
Standard output is empty