453 条题解
-
0Saika LV 8 @ 2016-01-11 14:27:51
main()
{
int a[10];
int h;
int i,j;
int ans;
for(i=1;i<=10;i++) scanf("%d",&a[i]);
scanf("%d",&h);
ans=0;
for(i=1;i<=10;i++)
if (a[i]<=(30+h)) ans++;
printf("%d",ans);
} -
02016-01-04 08:58:16@
#include<iostream>
using namespace std;
int main()
{
int m,b[11],sum=0;
for (int i=1;i<=10;++i)
cin>>b[i];
cin>>m;
m=m+30;
for(int i=1;i<=10;++i)
if(m>=b[i])
sum++;
cout<<sum<<endl;
return 0;
} -
02015-12-24 16:00:54@
Free Pascal
var
a:array[1..10] of integer;
x,i,sum:integer;
begin
for i:=1 to 10 do read(a[i]);readln;
readln(x);x:=x+30;
sum:=0;
for i:=1 to 10 do
if x>=a[i] then inc(sum);
writeln(sum);
end. -
02015-11-22 11:30:08@
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int a,b,c,d,e,f,g,h,i,j,k,l=0;cin>>b>>c>>d>>e>>f>>g>>h>>i>>j>>k;
cin>>a;
a=a+30;
if(b<=a)
{
l++;}
if(c<=a)
{
l++;
}
if(d<=a)
{
l++;
}if(e<=a)
{
l++;
}if(f<=a)
{
l++;}if(g<=a)
{
l++;
}if(h<=a)
{
l++;}if(i<=a)
{
l++;}if(j<=a)
{
l++;
;
}if(k<=a)
{
l++;
;
}
cout<<l<<endl;;
return 0;
} -
02015-10-13 13:31:27@
#include <stdio.h>
#include <stdlib.h>int main()
{
int a[9]={100,200,150,140,129,134,167,198,200,111},b=110,c=30,i,num;
num=0;
for(i=0;i<=9;++i)
if (a[i]<=b+c)
num +=1;
else num+=0;
printf("%d\n",num);
return 0;
} -
02015-09-14 01:07:05@
#include <iostream>
#include <vector>using namespace std;
int main()
{
vector<int>a;
int i,j;
while(cin>>i)a.push_back(i);
i=a[a.size()-1]+30;
int w=0;
for(j=0;j<a.size()-1;++j)
{
if(i>=a[j])++w;
}
cout<<w;
return 0;
} -
02015-08-29 15:24:14@
var
-
02015-08-17 15:13:16@
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int a[12],n,sum=0;
for(int i=1;i<=10;i++){
scanf("%d",&a[i]);
}
scanf("%d",&n);
for(int i=1;i<=10;i++){
if(n+30>=a[i]){
sum++;
}
}
printf("%d",sum);
return 0;
} -
02015-07-26 12:37:53@
用C写的
目测没错
#include<stdio.h>
int main()
{
int a[10],t,i,c=0;
for(i=0;i<10;i++)
scanf("%d",&a[i]);
scanf("%d",&t);
for(i=0;i<10;i++)
if(t+30>=a[i])
c++;
printf("%d",c);
} -
02015-07-04 19:37:05@
#include <iostream>
using namespace std;
int a[15];int high;
int main () {
for (int i = 1;i <= 10;++i) cin >> a[i];
cin >> high;high += 30;
int ans = 0;
for (int i = 1;i <= 10;++i) if (a[i] <= high) ans ++;
cout << ans << "\n";
return 0;
} -
02015-05-06 22:31:29@
var a:array[1..10] of integer;
n,k,i:integer;
begin
k:=0;
for i:=1 to 10 do
read(a[i]);
readln(n);
for i:=1 to 10 do
if a[i]<=n+30 then k:=k+1;
writeln(k);
end. -
02015-04-07 21:50:27@
评测结果
编译成功测试数据 #0: Accepted, time = 0 ms, mem = 464 KiB, score = 10
测试数据 #1: Accepted, time = 0 ms, mem = 468 KiB, score = 10
测试数据 #2: Accepted, time = 0 ms, mem = 472 KiB, score = 10
测试数据 #3: Accepted, time = 0 ms, mem = 468 KiB, score = 10
测试数据 #4: Accepted, time = 0 ms, mem = 472 KiB, score = 10
测试数据 #5: Accepted, time = 0 ms, mem = 476 KiB, score = 10
测试数据 #6: Accepted, time = 0 ms, mem = 472 KiB, score = 10
测试数据 #7: Accepted, time = 0 ms, mem = 464 KiB, score = 10
测试数据 #8: Accepted, time = 0 ms, mem = 468 KiB, score = 10
测试数据 #9: Accepted, time = 15 ms, mem = 472 KiB, score = 10
Accepted, time = 15 ms, mem = 476 KiB, score = 100
代码
#include<iostream>
using namespace std;
int main()
{
int i,j,t,s;
int a[1001];
for (i=1; i <= 10; i++)
cin >> a[i];
cin >> j;
s=j+30; t=0;
for (i=1; i <= 10; i++)
if (a[i] <= s)
t++;
cout << t;
return 0;
} -
02015-02-09 22:34:54@
#include<stdio.h>
int main()
{
int a[10];
int i,j,b;
int count=0;
for(i=0;i<10;i++){
scanf("%d",&a[i]);
}
scanf("%d",&b);
for(j=0;j<10;j++){ if(a[j]<=(b+30)){ count++; } } printf("%d\n",count); return 0; -
02015-01-18 10:59:53@
program kkkk;
var
i,j,tao,k:integer;
a:array[1..10] of integer;
begin
for i:=1 to 10 do
read(a[i]);
readln(tao);
tao:=tao+30;
k:=0;
for i:=1 to 10 do
if tao>=a[i] then k:=k+1;
writeln(k);
end. -
02014-12-13 07:43:43@
int main(){
int a[10],l,sum=0;
for (int i = 0; i < 10; i++)
scanf("%d",&a[i]);
scanf("%d",&l);
for (int i = 0; i < 10; i++)
if (l+30>=a[i])
sum++;
printf("%d", sum);
return 0;
} -
02014-12-12 19:39:16@
program ex;
var data:array[1..10] of longint;
i,h,ans,num:longint;
begin
ans:=0;
for i:=1 to 10 do
begin
read(num);
data[i]:=num;
end;read(h);
h:=h+30;
for i:=1 to 10 do
begin
if data[i]<=h then
inc(ans);
end;write(ans);
end. -
02014-11-28 21:57:43@
apple = [int(x) for x in raw_input().split()]
taotao = int(raw_input()) + 30
print len([x for x in apple if x <= taotao])求更鬼畜的写法……orz
-
02014-11-03 20:23:02@
var i,j,t,k:integer;
a:array[1..10] of integer;
begin
for i := 1 to 10 do
read (a[i]);
readln(t);
t:=t+30;
k:=0;
for i := 1 to 10 do
if t >=a[i] then k:=k+1;
writeln(k);
end. -
02014-11-03 13:12:45@
program apple;
var i,j,tao,k:integer;
a:array[1..10] of integer;
begin
for i := 1 to 10 do
read (a[i]);
readln(tao);
tao:=tao+30;
k:=0;
for i := 1 to 10 do
if tao >=a[i] then k:=k+1;
writeln(k);
end. -
02014-10-31 16:24:07@
Python
k=map(int,raw_input().split());l=input()+30;print len(filter(lambda x:x<=l,k))