神梦一刀 @ 2017-03-18 16:24:10
#include<iostream>
using namespace std;
int main()
{
int h,p,d=30,s=0;
cin>>h;
for(int i=1;i<=10;++i)
{
cin>>p;
if(p<=d+h)
s++;
}
cout<<s;
return 0;
}
by jiubei @ 2017-03-18 16:30:45
先读苹果高度的,看样例
by 1nfinity @ 2017-03-23 13:20:24
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int a[10],n,s=0;
for(int i=0; i<10; i++)cin>>a[i];
sort(a,a+10);
cin>>n;
for(int i=0; i<10; i++)
{
if((n+30)>=a[i])s++;
}
cout<<s<<endl;
return 0;
}
by 叮叮当当。 @ 2017-04-16 14:26:50
有没有人给我个Pascal的程序?