fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b, c;
  6. cin >> a >> b >> c;
  7. if (a == b == c){
  8. cout << "3" << endl;
  9. }
  10. if ((a == b) || (a == c) || (b == c)){
  11. cout << "2" << endl;
  12. }
  13. else {
  14. cout << "0" << endl;
  15. }
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5312KB
stdin
1 0 1
stdout
2