题解

456 条题解

  • 0
    @ 2018-06-21 15:02:30

    height_of_apple = input(" ")
    arm_height = input(" ")
    arm_height = int(arm_height)
    height_of_apple = height_of_apple.split()
    e = list()
    for c in height_of_apple:
    c = int(c)
    if arm_height >= c or arm_height + 30 >= c:
    e.append(c)
    print(len(e))

  • 0
    @ 2018-04-30 21:41:26

    using System;
    using System.Linq;

    namespace ConsoleApplication6
    {
    class Program
    {
    static void Main(string[] args)
    {
    string str1 = Console.ReadLine();
    string str2 = Console.ReadLine();
    string[] strnumLlist = str1.Split(' ');

    Console.WriteLine((from s in strnumLlist
    where int.Parse(s) <= int.Parse(str2) + 30
    select int.Parse(s)).Count());
    }
    }
    }

  • 0
    @ 2018-04-30 21:41:02

    using System;
    using System.Linq;

    namespace ConsoleApplication6
    {
    class Program
    {
    static void Main(string[] args)
    {
    string str1 = Console.ReadLine();
    string str2 = Console.ReadLine();
    string[] strnumLlist = str1.Split(' ');

    Console.WriteLine((from s in strnumLlist
    where int.Parse(s) <= int.Parse(str2) + 30
    select int.Parse(s)).Count());
    }
    }
    }

  • 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;
    }

信息

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