给能够到的高度加30,依次比较
#include<bits/stdc++.h>
using namespace std;
int main(){
int a[17],i,j,s=0;
for(i=1;i<=10;i++){
cin>>a[i];
}
cin>>j;
j=j+30;
for(i=1;i<=10;i++){
if(a[i]<=j){
s++;
}
}
cout<<s;
}
标签:std,includeusing,17,NOIP,int,30,cin,陶陶,2005
来源: https://www.cnblogs.com/wangjunlong9948/p/16581927.html