太简单了

P1046 [NOIP2005 普及组] 陶陶摘苹果

·靈·柒· @ 2017-09-23 15:13:23

var a:array[1..1000] of longint;
    i,j,n,s:longint;
begin
for i:=1 to 10 do read(a[i]);
read(j);
for i:=1 to 10 do
if a[i]<=j+30 then
s:=s+1;
writeln(s);
end.

by 巫妖王 @ 2017-09-24 10:37:42

var a:array[1..10]of longint;
    l,i,m:longint;
begin
for i:=1 to 10 do
read(a[i]);
readln;
read(l);
l:=l+30;
for i:=1 to 10 do
if l>=a[i] then inc(m);
write(m);
end.

by yywxdgy @ 2017-09-25 19:40:26

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int i,s,n,a[11];
    for(i=1;i<=10;i++)cin>>a[i];
    cin>>n;n=n+30;s=0;
    for(i=1;i<=10;i++)
     if(a[i]<=n)s+=1;
    cout<<s;
    return 0;
}

by 落后的LZY @ 2017-10-07 18:59:31

#include<iostream>
using namespace std;
int main()
{
    int m=10,a[11],b,sum=0;
    for(int i=1;i<=m;i++)
    cin>>a[i];
    cin>>b;
    for(int i=1;i<=m;i++)
    if(a[i]<=b+30)
    sum++;
    cout<<sum;
}

by WendY3027 @ 2017-10-14 20:44:03

var a:array[1..10]of longint;i,j,k,m,n,g,h,t,y:longint;

begin for i:=1 to 10 do read(a[i]);read(n);n:=n+30;

for i:=1 to 10 do if n>=a[i] then g:=g+1;writeln(g);end.


|