Advertisement
dllbridge

Untitled

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