fork download
  1.  
  2. import java.util.*;
  3. import java.lang.*;
  4. import java.io.*;
  5.  
  6. class Main {
  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. int c = scanner.nextInt();
  14. int result;
  15.  
  16. /*if (a == b && b == c && a == c) {
  17. System.out.print(1);
  18. }
  19. else if (a == b || b == c || a == c) {
  20. System.out.print(2);
  21. }
  22. else {
  23. System.out.print(3);
  24. }*/
  25.  
  26. result = (a == b && b == c && a == c) ? 1 : (a == b || b == c || a == c) ? 2 : 3;
  27.  
  28. System.out.print(result);
  29.  
  30. }
  31. }
Success #stdin #stdout 0.14s 321280KB
stdin
3 8 0
stdout
3