求助,为什么错,求求了

var

a,b,c,e:integer; d:array[1..12]of integer;

begin b:=0; c:=0;

for a:=1 to 12 do read(d[a]);

for a:=1 to 12 do begin

b:=b+300;

b:=b-(d[a]);

if b0 then begin

b:=b-(b div 100); c:=c+(b div 100)*100;

end;

if e=0 then write(c*1.2);

end.

3 条评论

  • @ 2014-07-20 10:03:22

    var
    i,b,m,n:longint;
    a:array[0..12] of longint;
    begin
    for i:=1 to 12 do
    readln(a[i]);
    i:=0;b:=0;m:=0;
    repeat
    inc(i);
    b:=b+300;
    b:=b-a[i];
    if b<0 then begin
    writeln(-i);
    exit;
    end else begin
    n:=b div 100;
    m:=m+n*100;
    b:=b-n*100;
    end;
    until i=12;
    if b>=0 then writeln(m*1.2+b:0:0);
    end.

  • @ 2013-07-09 15:57:50

    var
    i,j,bank,x,y:longint;
    moon,now:array[0..12]of integer;
    begin
    bank:=0;
    for i:=1 to 12 do readln(moon[i]);
    now[0]:=0;
    for i:= 1 to 12 do
    begin
    now[i]:=now[i-1]+300;
    x:=now[i]-moon[i];
    if x<0 then y:=-1
    else y:=x div 100;
    case y of
    -1:begin writeln(-i);halt;end;
    0:now[i]:=x;
    1..5:begin inc(bank,y*100); now[i]:=x-y*100; end;
    end;
    end;
    writeln(now[12]+bank*1.2:0:0);
    end.

  • @ 2012-10-07 00:00:04

    为什么还错?

  • 1

信息

ID
1096
难度
5
分类
模拟 点击显示
标签
递交数
15994
已通过
5676
通过率
35%
被复制
37
上传者