'commit'
This commit is contained in:
17
C++专题课程/NOIP算法总结/枚举/陶陶摘苹果/P1046.cpp
Normal file
17
C++专题课程/NOIP算法总结/枚举/陶陶摘苹果/P1046.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include<iostream>
|
||||
using namespace std;
|
||||
int a[15];
|
||||
int main() {
|
||||
int b,B,A;
|
||||
for(int i=1; i<=10; i++)
|
||||
cin>>a[i];
|
||||
cin>>b;
|
||||
B=b+30;
|
||||
int c=0;
|
||||
for(int i=1; i<=10; i++) {
|
||||
if(a[i]<=B)
|
||||
c++ ;
|
||||
}
|
||||
cout<<c;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user