成功秒杀

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.

5 条评论

  • @ 2016-10-05 16:05:00

    好厉害

  • @ 2015-06-02 19:21:27

    第一个题解
    program tao;
    var
    a:array[1..1000] of integer;
    b,c,d:integer;
    begin
    for b:=1 to 10 do
    read(a[b]);
    readln;
    read(c);
    for b:=1 to 10 do
    if a[b]<=c+30 then
    d:=d+1;
    write(d);
    end.
    简单的方法

  • @ 2014-07-24 21:09:17

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

  • @ 2014-07-15 15:50:05

    var
    a:array[1..10] of longint;
    x,i,count:longint;
    begin

    for i:=1 to 10 do
    read(a[i]);
    readln(x);
    x:=x+30;

    for i:=1 to 10 do
    begin
    if x>=a[i] then
    count:=count+1;
    end;

    write(count);
    readln
    end.

  • @ 2014-03-06 21:23:29

    赞!!!!!!!!!!

  • 1

信息

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