fork download
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. long long T, a, b, c;
  8.  
  9. cin >> T;
  10.  
  11. for (int j = 1; j <= T; j++)
  12. {
  13. cin >> a >> b >> c;
  14. if (a == b && b == c && c==a)
  15. {
  16. cout << "1" << endl;
  17. }
  18. if (a == b || b == c || c == a)
  19. {
  20. cout << "2" << endl;
  21. }
  22. if (a != b && b != a && c != a)
  23. {
  24. cout << "3" << endl;
  25. }
  26. }
  27. return 0;
  28. }
Success #stdin #stdout 0s 4480KB
stdin
4
3 4 3
5 5 5
11 12 13
100 100 100
stdout
2
1
2
3
1
2