P1046 陶陶摘苹果解答

· · 个人记录

本场比赛真正的核心题目

经典题目了,想必也不用多说awa

简简单单的判断~

直接把我的代码放上了

#include <bits/stdc++.h>

using namespace std;

int main(){
    int a[10],b,x=0;//依旧重复注意这个=0
    for(int i=0;i<10;i++){
        cin>>a[i];
    }
    cin>>b;
    b=b+30;
    for(int i=0;i<10;i++){
        if(b>=a[i]){
            x++;
        }
    }
    cout<<x;
    return 0;
}
问:陶陶在这次比赛中都做了些什么awa