Advertisement
dllbridge

Untitled

Nov 24th, 2022
583
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4.  
  5. long long a[4], w;
  6.  
  7. int main()
  8. {
  9.     cin >> a[0] >> a[1] >> a[2] >> a[3];
  10.    
  11.     sort(a, a + 4);
  12.    
  13.     for(int i = 0; i < 4; i++) if(a[i] == a[i + 1]) w++;
  14.    
  15.     cout << w;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement