| 
 | 
вернуться в форумNo subject (1) 0 1 -> 1 wait 2 3-> 5 wait print 1 3 4-> 7 wait print 5 . . (2) 0 1 ->1  wait 4 5 -> 9 #1 wait 4 5 ->9 #2 wait 4 5 -> 9 #3  wait 2 2 ->4  wait  <- now- printf '1' & print '9' for 3 . . (3) 0 1 ->1 wait 4 5 -> 9 #1 wait 4 5 ->9 #2 wait 4 5 -> 9 #3  wait 5 5 ->10  wait <- now- printf 1+1=2 & print '0' for 3 . . .   And this my program ,Who can tell why I got WA? var   X,Y,save:byte;   N,I,j,mark:longint;   start:boolean; begin   readln(N);   mark:=0;start:=true;   for i:=1 to N do begin     readln(x,y);     if start and(x+y=0) then continue                         else start:=false;     if mark=0 then begin save:=x+y;inc(mark); end               else if x+y<9 then begin                                      write(save);                                      for j:=1 to mark-1 do write(9);                                      save:=x+y;mark:=1;                                  end                    else if x+y=9 then inc(mark)                         else begin                                write(save+1);                                for j:=1 to mark-1 do write(0);                                save:=x+y-10;mark:=1;                              end;   end;   write(save);   for j:=1 to mark-1 do write(9);   writeln; end.  |  
  | 
|