题解

453 条题解

  • 0
    @ 2014-10-25 17:54:05

    水题……………………
    Seckilling………………
    ####代码
    program water;
    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.
    此题不AC者,建议转行……

  • 0
    @ 2014-08-25 20:06:21

    var
    l:array[1..10]of integer;
    i,j,k:integer;
    begin
    for i:=1 to 10 do readln(l[i]);
    readln(j);
    k:=0;
    for i:=1 to 10 do begin
    if not(l[i]>j+30) then inc(k);
    end;
    writeln(k);
    end.

  • 0
    @ 2014-08-01 16:56:10

    记录信息
    评测状态 Accepted
    题目 P1102 陶陶摘苹果
    递交时间 2014-08-01 16:53:46
    代码语言 C++
    评测机 VijosEx
    消耗时间 0 ms
    消耗内存 272 KiB
    评测时间 2014-08-01 16:53:51
    评测结果
    编译成功

    测试数据 #0: Accepted, time = 0 ms, mem = 272 KiB, score = 10
    测试数据 #1: Accepted, time = 0 ms, mem = 268 KiB, score = 10
    测试数据 #2: Accepted, time = 0 ms, mem = 272 KiB, score = 10
    测试数据 #3: Accepted, time = 0 ms, mem = 268 KiB, score = 10
    测试数据 #4: Accepted, time = 0 ms, mem = 268 KiB, score = 10
    测试数据 #5: Accepted, time = 0 ms, mem = 272 KiB, score = 10
    测试数据 #6: Accepted, time = 0 ms, mem = 268 KiB, score = 10
    测试数据 #7: Accepted, time = 0 ms, mem = 272 KiB, score = 10
    测试数据 #8: Accepted, time = 0 ms, mem = 272 KiB, score = 10
    测试数据 #9: Accepted, time = 0 ms, mem = 272 KiB, score = 10
    Accepted, time = 0 ms, mem = 272 KiB, score = 100

  • 0
    @ 2014-08-01 16:55:42

    1次秒杀~~~

    记录信息
    评测状态 Accepted
    题目 P1102 陶陶摘苹果
    递交时间 2014-08-01 16:53:46
    代码语言 C++
    评测机 VijosEx
    消耗时间 0 ms
    消耗内存 272 KiB
    评测时间 2014-08-01 16:53:51
    评测结果
    编译成功

    测试数据 #0: Accepted, time = 0 ms, mem = 272 KiB, score = 10
    测试数据 #1: Accepted, time = 0 ms, mem = 268 KiB, score = 10
    测试数据 #2: Accepted, time = 0 ms, mem = 272 KiB, score = 10
    测试数据 #3: Accepted, time = 0 ms, mem = 268 KiB, score = 10
    测试数据 #4: Accepted, time = 0 ms, mem = 268 KiB, score = 10
    测试数据 #5: Accepted, time = 0 ms, mem = 272 KiB, score = 10
    测试数据 #6: Accepted, time = 0 ms, mem = 268 KiB, score = 10
    测试数据 #7: Accepted, time = 0 ms, mem = 272 KiB, score = 10
    测试数据 #8: Accepted, time = 0 ms, mem = 272 KiB, score = 10
    测试数据 #9: Accepted, time = 0 ms, mem = 272 KiB, score = 10
    Accepted, time = 0 ms, mem = 272 KiB, score = 100
    代码
    #include <iostream>

    using namespace std;

    int main()
    {
    int arr[10];
    int idx = 0;
    int h = 0, cnt = 0;

    for (idx = 0; idx < 10; idx++)
    {
    cin >> arr[idx];
    }
    cin >> h;
    for (idx = 0; idx < 10; idx++)
    {
    if (arr[idx] <= h + 30)
    {
    cnt++;
    }
    }
    cout << cnt << endl;
    return 0;
    }

  • 0
    @ 2014-07-20 10:05:40

    测试数据 #0: Accepted, time = 0 ms, mem = 740 KiB, score = 10
    测试数据 #1: Accepted, time = 0 ms, mem = 740 KiB, score = 10
    测试数据 #2: Accepted, time = 0 ms, mem = 740 KiB, score = 10
    测试数据 #3: Accepted, time = 0 ms, mem = 740 KiB, score = 10
    测试数据 #4: Accepted, time = 0 ms, mem = 744 KiB, score = 10
    测试数据 #5: Accepted, time = 0 ms, mem = 744 KiB, score = 10
    测试数据 #6: Accepted, time = 0 ms, mem = 740 KiB, score = 10
    测试数据 #7: Accepted, time = 0 ms, mem = 744 KiB, score = 10
    测试数据 #8: Accepted, time = 0 ms, mem = 740 KiB, score = 10
    测试数据 #9: Accepted, time = 0 ms, mem = 740 KiB, score = 10

  • 0
    @ 2014-06-01 21:29:04

    var
    a:array[1..10] of longint;
    i,c,s,num:longint;
    begin
    s:=0;
    for i:=1 to 10 do read(a[i]);
    read(c);
    for i:=1 to 10 do if a[i]<=c+30 then inc(s);

    writeln(s);
    end.

  • 0
    @ 2014-05-13 15:53:26

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

  • 0
    @ 2014-05-09 18:49:55

    #include <cstdio>
    int main(){
    int h,pg[10]={0},a,p=0;
    scanf("%d %d %d %d %d %d %d %d %d %d",&pg[0],&pg[1],&pg[2],&pg[3],&pg[4],&pg[5],&pg[6],&pg[7],&pg[8],&pg[9]);

    scanf("%d",&h);
    h+=30;
    for(a=0;a<10;a++){
    if(h>=pg[a]){
    p++;

    }
    else;

    }
    printf("%d\n",p);

    }
    写得有点丑

  • 0
    @ 2014-03-29 14:38:25

    var x,y,i,max,top:longint;
    begin
    max:=0;top:=0;
    for i:=1 to 7 do
    begin
    readln(x,y);
    if x+y>max then
    begin
    max:=x+y;top:=i;
    end;
    end;
    if max<=8 then write(max)
    else write(top);
    end.

  • 0
    @ 2014-02-25 07:22:39

    #include<iostream>
    using namespace std;
    int a[11],m,s;
    int main()
    {
    for(int i=1;i<=10;i++) cin>>a[i];
    cin>>m;
    m=m+30;
    for(int i=1;i<=10;i++) if(a[i]<=m) s++;
    cout<<s;
    return 0;
    }
    13行 完美秒杀

  • 0
    @ 2014-01-18 11:15:55

    var
    a:array[1..10] of integer;
    hand :longint;
    i,total :integer;

    begin
    readln (a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);
    readln (hand);
    for i:=1 to 10 do
    begin
    if hand+30>=a[i] then total:=total+1;
    end;
    writeln (total);
    end.

  • 0
    @ 2014-01-15 12:23:42

    var a:array[1..10] of integer;
    s,b,c:integer;
    begin
    s:=0;
    for b:=1 to 10 do read(a[b]);
    readln(c);
    for b:=1 to 10 do if a[b]<=c+30 then s:=s+1;
    write(s);
    end.

  • 0
    @ 2014-01-01 11:59:51

    Vijos 题解:http://hi.baidu.com/umule/item/2c997f8ed9600fdae596e017
    有疑问请留言 共同进步

  • 0
    @ 2013-12-13 22:20:55

    var a:array[1..10]of integer;
    h,sum,i:integer;
    begin
    sum:=0;
    for i:=1 to 10 do read(a[i]);
    readln(h);
    for i:=1 to 10 do if a[i]<=h+30 then sum:=sum+1;
    writeln(sum);
    end.

  • 0
    @ 2013-10-30 07:34:43

    #include<cstdio>
    int r=0,h[11];
    int main(){
    for(int i=1;i<=10;i++) scanf("%d",&h[i]);
    scanf("%d" , &h[ 0 ] ); h[ 0 ] += 30;
    for(int i=1;i<=10;i++) if (h[0]>=h[i])r++;
    printf("%d",r);

    }

  • 0
    @ 2013-10-27 19:23:20

    编译成功

    测试数据 #0: Accepted, time = 0 ms, mem = 824 KiB, score = 10

    测试数据 #1: Accepted, time = 0 ms, mem = 824 KiB, score = 10

    测试数据 #2: Accepted, time = 0 ms, mem = 820 KiB, score = 10

    测试数据 #3: Accepted, time = 0 ms, mem = 820 KiB, score = 10

    测试数据 #4: Accepted, time = 0 ms, mem = 820 KiB, score = 10

    测试数据 #5: Accepted, time = 0 ms, mem = 820 KiB, score = 10

    测试数据 #6: Accepted, time = 0 ms, mem = 820 KiB, score = 10

    测试数据 #7: Accepted, time = 0 ms, mem = 824 KiB, score = 10

    测试数据 #8: Accepted, time = 0 ms, mem = 820 KiB, score = 10

    测试数据 #9: Accepted, time = 0 ms, mem = 824 KiB, score = 10

    Accepted, time = 0 ms, mem = 824 KiB, score = 100

    代码
    var a:array[1..10]of integer;
    h,sum,i:integer;
    begin
    sum:=0;
    for i:=1 to 10 do read(a[i]);
    readln(h);
    for i:=1 to 10 do if a[i]<=h+30 then sum:=sum+1;
    writeln(sum);
    end.

  • 0
    @ 2013-10-22 22:27:14

    记录信息
    评测状态 Accepted
    题目 P1102 陶陶摘苹果
    递交时间 2013-10-22 22:26:36
    代码语言 C
    评测机 上海红茶馆
    消耗时间 0 ms
    消耗内存 544 KiB
    评测时间 2013-10-22 22:26:37

    评测结果
    编译成功

    测试数据 #0: Accepted, time = 0 ms, mem = 536 KiB, score = 10

    测试数据 #1: Accepted, time = 0 ms, mem = 544 KiB, score = 10

    测试数据 #2: Accepted, time = 0 ms, mem = 536 KiB, score = 10

    测试数据 #3: Accepted, time = 0 ms, mem = 540 KiB, score = 10

    测试数据 #4: Accepted, time = 0 ms, mem = 540 KiB, score = 10

    测试数据 #5: Accepted, time = 0 ms, mem = 536 KiB, score = 10

    测试数据 #6: Accepted, time = 0 ms, mem = 536 KiB, score = 10

    测试数据 #7: Accepted, time = 0 ms, mem = 536 KiB, score = 10

    测试数据 #8: Accepted, time = 0 ms, mem = 536 KiB, score = 10

    测试数据 #9: Accepted, time = 0 ms, mem = 540 KiB, score = 10

    Accepted, time = 0 ms, mem = 544 KiB, score = 100

    代码
    #include <stdio.h>
    int main (){
    int tt,sum=0,i,a[10];
    for (i=0;i<10;i++)
    {scanf ("%d",&a[i]);
    }
    scanf ("%d",&tt);
    for (i=0;i<10;i++)
    {if ((tt+30)>=a[i]) sum++;
    }
    printf ("%d\n",sum);
    return 0;
    }

  • 0
    @ 2013-10-15 13:06:35

    var a:array[1..10] of integer;
    b,c,d:integer;
    begin
    for b:=1 to 10 do
    read(a[b]);
    read(c);
    c:=c+30;
    for b:= 1 to 10 do
    if c>=a[b] then
    inc(d);
    write(d);
    end.

  • 0
    @ 2013-10-12 13:25:25

    var a:array[1..10] of integer;
    b,c,d:integer;
    begin
    for b:=1 to 10 do
    read(a[b]);
    read(c);
    c:=c+30;
    for b:= 1 to 10 do
    if c>=a[b] then
    inc(d);
    write(d);
    end.

  • 0
    @ 2013-10-03 16:14:14

    这题目难道是在秀智商下限吗。。。

    C++ Code:
    #include <iostream>
    using namespace std;
    int main(){
    int height[10];
    int tall;
    int result;
    result =0;
    for(int i=0;i<10;i++){
    cin>>height[i];
    }
    cin>>tall;
    tall+=30;
    for(int i=0;i<10;i++){
    if(height[i]<=tall){
    result++;
    }
    }
    cout<<result;
    }

信息

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