453 条题解
-
0twinsqq LV 4 @ 2016-10-06 17:26:16
void main()
{ int s[10],hmax,n,i;
n=0;for(i=0;i<10;i++ )
{
scanf("%d",&s[i]);
}
scanf("%d",&hmax);
hmax=hmax+30;for(i=0;i<10;i++ )
{if(hmax>=s[i])
n=n+1;
}
printf("%d",n);
} -
02016-10-03 16:47:44@
水题——陶陶摘苹果
Python代码
def hs():
c='';
i=0;
ans=0;
while i<=len(s)-1:
if s[i]!=' ':
c=c+s[i];
else:
m=int(c);
if n+30>=m:
ans=ans+1;
c='';
i=i+1;
return ans;s=raw_input()+' ';
n=int(raw_input());
print hs();Pascal代码
var i,j,ans:longint; a:array [1..10] of longint;
begin
for i:=1 to 10 do read(a[i]);
readln(j);
for i:=1 to 10 do
if j+30>=a[i] then inc(ans);
writeln(ans);
end. -
02016-09-21 18:39:49@
#include <cstdio>
using namespace std;
int a[10];
int main() {
int b,n=0;
for(int i=1;i<=10;i++)
scanf("%d",&a[i]);
scanf("%d",&b);
b+=30;
for(int i=1;i<=10;i++)if(b>=a[i])n++;
printf("%d",n);
return 0;
} -
02016-09-07 21:56:36@
program lsdJl;
var
a:array[1..10] of longint;
i,j,l,s:longint;
begin
for i:=1 to 10 do
read(a[i]);
readln(l); l:=l+30;
for i:=1 to 10 do
if a[i]<=l then inc(s);
writeln(s);
end. -
02016-08-18 12:41:48@
好难啊不会做
```c++
#include <iostream>
using namespace std;int a[12];
int x,ans;int main()
{
for(int i=1;i<=10;i++)
cin>>a[i];
cin>>x;
x+=30;
for(int i=1;i<=10;i++)
if(x>=a[i])
ans++;
cout<<ans<<endl;
return 0;
}
``` -
02016-08-08 00:08:31@
pascal转C喽~~~~
###c code
#include <stdio.h>
#include <stdlib.h>int main(void)
{
int a[15];
int i,ans,num;
ans=0;
for(i=1;i<=10;i++){
scanf("%d",&a[i]);
}
scanf("%d",&num);
num=num+30;
for(i=1;i<=10;i++){
if(a[i]<=num){
ans++;
}
}
printf("%d",ans);
return 0;
} -
02016-07-24 16:33:07@
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <numeric>
#define n 10
struct node
{
int val,l,r,m,R,L;
}a[1000];int v;
void build(int l,int r,int k)
{
a[k].l=l;
a[k].r=r;
a[k].m=(l+r)>>1;
a[k].L=(k<<1);
a[k].R=(k<<1)+1;
if (l==r) return ;
build(l,a[k].m,a[k].L);
build(a[k].m+1,r,a[k].R);
}
void find(int k,int x,int s)
{
if (a[k].m==x)
{
a[k].val=s;
return ;
}
if (a[k].m>x)
find(a[k].L,x,s);
if (a[k].m<x)
find(a[k].R,x,s);}
int q(int k,int s)
{
if (a[k].m==s)
return a[k].val;
if (a[k].m>s) return q(a[k].L,s);
if (a[k].m<s) return q(a[k].R,s);
}
int main()
{
//scanf("%d",&n);
int h,i;
build(1,n,1);
for (i=1;i<=n;i++)
{
scanf("%d",&v);
find(1,i,v);
}
scanf("%d",&h);
h+=30;
int ans=0;
for (i=1;i<=n;i++)
if (q(1,i)<=h)
ans++;
printf("%d",ans);
return 0;
} -
02016-07-13 20:31:27@
#include<stdio.h>
int main()
{int i,a[10],b,c=0;
for(i=1;i<=10;i++)
scanf("%d",&a[i]);
scanf("%d",&b);
for(i=1;i<=10;i++)
{if(a[i]<=b+30) c++;
else continue;
}
printf("%d",c);
system("pause");
} -
02016-07-13 17:15:19@
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
int i;
int h[210];
int c;
int count=0;
for(i=1;i<=10;i++){
cin>>h[i];
}
cin>>c;
for(i=1;i<=10;i++){
if(h[i]<=c+30){
count++;
}
}
cout<<count;
return 0;
} -
02016-06-28 16:01:40@
var
a:array[1..10]of integer;
i,j,s:integer;
begin
s:=0;
for i:=1 to 10 do readln(a[i]);
read(j);
if j>a[i] then inc(s);
write(s);
end. -
02016-06-22 21:06:41@
转战java第一题
import java.io.*;
import java.util.Scanner;public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int i;
int a[] = new int [100];
for (i=1;i<=10;i++)
a[i] = in.nextInt();
int p = in.nextInt();
int ans = 0;
for (i=1;i<=10;i++) if ((p+30)>=a[i]) ans++;
System.out.println(ans);
}
} -
02016-06-14 16:39:16@
var i,k,ans:integer;
a:array[1..10] of integer;
begin
for i:=1 to 9 do read(a[i]);
readln(a[10]);
readln(k);
for i:=1 to 10 do if a[i]<=k+30 then inc(ans);
writeln(ans);
end. -
02016-05-09 22:32:17@
program text1;
var i,zd,g,ans:longint;
a:array[1..10] of longint;
begin
for i:=1 to 10 do
read(a[i]);
read(g);
zd:=g+30;
for i:=1 to 10 do
if a[i]<=zd then inc(ans);
write(ans);
end. -
02016-04-30 15:45:12@
8
-
02016-04-30 15:45:00@
8
-
02016-04-30 15:44:28@
#include<iostream> using namespace std; int a[15]; int main() { int b,sum=0; for(int i=0;i<=9;i++) cin>>a[i]; cin>>b; for(int j=0;j<=9;j++) { if((b+30)>=a[j]) sum++; } cout<<sum; return 0; }
-
02016-03-14 17:13:20@
#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;
}//c++
-
02016-03-01 16:16:59@
program exam;
var
a:array[1..10]of longint;
i,l,s:longint;
begin
s:=0;
for i:=1 to 10 do
read(a[i]);
read(l);
for i:=1 to 10 do
if l+30>=a[i] then inc(s);
write(s);
end. -
02016-02-18 11:21:03@
用循环的都垃圾!
c++
#include<stdio.h>
int n;
int Ans(int x){
if(x==0) return 0&scanf("%d",&n);
int k; scanf("%d",&k);
return Ans(x-1)+(k<=(n+30));
}
int main(){
printf("%d",Ans(10));
}
-
02016-02-11 21:36:50@
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <algorithm>using namespace std;
int a[11];
int high,ans = 0;
int main(){
for(int i = 1;i <= 10;i ++){
scanf("%d",&a[i]);
}
scanf("%d",&high); high += 30;
for(int i = 1;i <= 10;i ++){
if(a[i] <= high)ans ++;
}
printf("%d",ans);
return 0;
}