a.题目链接
Problem - 677A - Codeforceshttps://codeforces.com/problemset/problem/677/Ab.我的做法:
#include <iostream>
using namespace std;
int main()
{
int t, f, n, h;//这种情况就不需要用到数组,直接用一个值来代替输入
cin >> t >> f;
n = 0;
while(t--){//这里不需要用到for,用while
cin >> h;
if(h>f)n=n+2;
else n++;
}
cout << n;
}