Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
2964 | 张志鹏 | 陶陶摘苹果 | C++ | 通过 | 100 | 0 MS | 248 KB | 294 | 2019-12-09 19:37:16 |
#include<iostream> using namespace std; int main(){ int pg[11]={0}; //定义pg为苹果高度 int sg; int shu=0; for(int i=1;i<=10;i++) cin>>pg[i]; //存储苹果高度 cin>>sg; sg+=30; for(int i=1;i<=10;i++){ if(sg>=pg[i]) shu++; } cout<<shu; return 0; }