题解

453 条题解

  • 0
    @ 2018-03-10 10:54:10

    #include <iostream>
    using namespace std;
    int height[20],H,s;
    int main()
    {
    for(int i=0;i<10;i++)cin >> height[i];
    cin >> H;
    H += 30;
    for(int i=0;i<10;i++)s+=!(H<height[i]);
    cout << s;
    }

  • 0
    @ 2018-02-13 14:54:20

    #include<iostream>
    using namespace std;
    int main()
    {
    int a[22],b,c,num=0,e[33],i,t;
    for (int i=0;i<10;i++)
    {
    cin>>a[i];
    }
    cin>>b;
    for(i=0;i<10;i++)
    {
    e[i]=a[i];
    if(e[i]<=b+30) num+=1;
    }
    cout<<num;
    return 0;
    }

  • 0
    @ 2018-02-03 10:34:11

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

  • 0
    @ 2018-02-03 10:10:33

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

  • 0
    @ 2018-01-31 14:39:23

    #include<stdio.h>
    int a[11];
    int main(){
    int c,i,t=0;
    for(i=1;i<=10;i++)
    scanf("%d",&a[i]);
    scanf("%d",&c);
    for(i=1;i<=10;i++)
    if(c+30>=a[i])
    t++;
    printf("%d",t);}

  • 0
    @ 2018-01-28 11:32:34

    //c++
    #include<iostream>
    using namespace std;
    #define a 10
    int b[a+30];
    int main(){
    int i,gd,t=0; //gd=淘淘伸手时能摸到的最高高度(+30)。
    for(i=0;i<a;i++){
    scanf("%d",&b[i]);
    }
    scanf("%d",&gd);
    gd+=30;
    for(i=0;i<a;i++){
    if(gd>=b[i]){
    t++;
    }
    }
    printf("%d",t);
    return 0;
    }

  • 0
    @ 2017-11-07 17:40:30

    var ah:array[1..10] of integer;
    a,b,c,d,e:integer;
    begin
    c:=0; read(b);
    for a:=1 to 10 do read(ah[a]);
    for a:=1 to 10 do
    if (ah[a]+30)<=b then c:=c+1;
    writeln(c);
    break;
    end.

  • 0
    @ 2017-10-29 22:22:53

    #include<iostream>
    using namespace std;
    int a[11];
    int main()
    {
    int i,c,x;
    c=0;
    for(i=0;i<10;i++)
    {
    cin>>a[i];
    }
    cin>>x;
    for(i=0;i<10;i++)
    {
    if(x+30>=a[i])
    {
    c++;
    }
    }
    cout<<c<<endl;
    system ("pause");
    return 0;
    }

  • 0
    @ 2017-10-23 22:30:31

    #include <iostream>
    using namespace std;
    int height[20],H,s;
    int main()
    {
    for(int i=0;i<10;i++)cin >> height[i];
    cin >> H;
    H += 30;
    for(int i=0;i<10;i++)s+=!(H<height[i]);
    cout << s;
    }

  • 0
    @ 2017-10-22 15:09:23

    #include <iostream>
    using namespace std;

    int main() {
    int height[10];
    int count = 0;
    int tall = 0;

    for (int i = 0; i < 10; i++)
    scanf("%d ", height + i);

    scanf("%d", &tall);
    tall += 30;
    for (size_t i = 0; i < 10; i++)
    if (tall >= height[i]) count++;

    printf("%d", count);
    return 0;
    }

  • 0
    @ 2017-10-22 15:09:11

    #include <iostream>
    using namespace std;

    int main() {
    int height[10];
    int count = 0;
    int tall = 0;

    for (int i = 0; i < 10; i++)
    scanf("%d ", height + i);

    scanf("%d", &tall);
    tall += 30;
    for (size_t i = 0; i < 10; i++)
    if (tall >= height[i]) count++;

    printf("%d", count);
    return 0;
    }

  • 0
    @ 2017-10-20 22:36:26

    var
    pg:array[1..10] of integer;
    a,s,d:integer;
    begin
    for s:=1 to 9 do
    read(pg[s]);
    readln(pg[10]);
    readln(a);
    for s:=1 to 10 do
    if (a+30) >= pg[s] then
    inc(d);
    writeln(d);
    end.

  • 0
    @ 2017-10-17 17:32:00

    var
    pg:array[1..10] of integer;
    a,s,d:integer;
    begin
    for s:=1 to 9 do
    read(pg[s]);
    readln(pg[10]);
    readln(a);
    for s:=1 to 10 do
    if (a+30) >= pg[s] then
    inc(d);
    writeln(d);
    end.

  • 0
    @ 2017-10-14 11:01:12

    #include<iostream>
    using namespace std ;
    int main()
    {
    int a[100];
    int i;
    for(i=1;i<=10;i++)
    {
    cin>>a[i];
    }
    int j,n;
    cin>>j;
    n=j+30;
    int count=0;
    for(i=1;i<=10;i++)
    if(a[i]<=(n))
    count++;
    cout<<count<<endl;
    return 0;
    }

  • 0
    @ 2017-10-01 14:18:37

    #include<iostream>
    using namespace std;
    int main()
    {
    int a[11],n,ans=0;
    for(int i=0;i<10;i++)
    cin>>a[i];
    cin>>n;
    n+=30;
    for(int i=0;i<10;i++)
    {
    if(n>=a[i])
    ans++;
    }
    cout<<ans<<endl;
    return 0;
    }

  • 0
    @ 2017-10-01 14:18:13

    #include<iostream>
    using namespace std;
    int main()
    {
    int a[11],n,ans=0;
    for(int i=0;i<10;i++)
    cin>>a[i];
    cin>>n;
    n+=30;
    for(int i=0;i<10;i++)
    {
    if(n>=a[i])
    ans++;
    }
    cout<<ans<<endl;
    return 0;
    }

  • 0
    @ 2017-10-01 14:14:32

    SO Water
    #include<iostream>
    using namespace std;
    int a[11];
    int main()
    {
    int n,h=30,ans=0;
    for(int i=1;i<=10;i++)
    {
    cin>>a[i];
    }
    cin>>n;
    for(int i=1;i<=10;i++)
    {
    if(a[i]<=(n+h))
    ans++;
    }
    cout<<ans<<endl;
    return 0;
    }

  • 0

    十三行过
    var
    i,j,b,n:integer;
    a:array[1..10]of integer;
    begin
    for i:=1 to 10 do
    read(a[i]);
    readln(n);
    n:=n+30;
    j:=0;
    for i:=1 to 10 do
    if a[i]<=n then inc(j);
    writeln(j);
    end.

  • 0
    @ 2017-09-13 21:31:52

    C语言 题解 已通过
    #include<cstdio>
    int a[10];
    int main()
    {
    int x,b,n=0,c=0;
    while(scanf("%d",&x)==1)
    {char ch;
    ch=getchar();
    a[n++]=x;
    if (ch=='\n')
    {
    break;
    }
    }
    scanf("%d",&b) ;
    for(int i=0;i<n;i++)
    {
    if((a[i]<=(b+30)))
    {
    c=c+1;
    }
    else
    {
    c=c+0;

    }
    }
    printf("%d",c);
    return 0;
    }

  • 0
    @ 2017-08-14 22:05:45

    #py 的第一条题解(或者我没注意)
    s=input()
    a,b,c,d,e,f,g,h,i,j=s.split(' ')
    k=input()
    k=int(k)
    ans = 0
    if int(a)<=k+30:
    ans=ans+1
    if int(b)<=k+30:
    ans=ans+1
    if int(c)<=k+30:
    ans=ans+1
    if int(d)<=k+30:
    ans=ans+1
    if int(e)<=k+30:
    ans=ans+1
    if int(f)<=k+30:
    ans=ans+1
    if int(g)<=k+30:
    ans=ans+1
    if int(h)<=k+30:
    ans=ans+1
    if int(i)<=k+30:
    ans=ans+1
    if int(j)<=k+30:
    ans=ans+1
    print(ans)

信息

ID
1102
难度
3
分类
模拟 点击显示
标签
递交数
16769
已通过
8813
通过率
53%
被复制
63
上传者