Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- long long a, b, c[1000], w;
- int main()
- {
- cin >> a >> b;
- for(int i = 0; i < a; i++) cin >> c[i];
- for(int i = 0; i < a; i++)
- {
- if(c[i] <= b) w++;
- else if(c[i] >= b) w+=2;
- }
- cout << w;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement