|  | 
|  | 
| вернуться в форум | where is wrong? Послано Sergey  21 фев 2003 00:53var n,m,otv:real;begin
 read(n,m);
 otv:=0;
 if m<=n then
 begin
 n:=m;
 otv:=1;
 end;
 otv:=otv+2*(n-1);
 if (n=0) then writeln(0)
 else writeln(otv:0:0);
 end.
Re: where is wrong? >  if m<=n thentry m<n instead
(+): I think my short Ac helps you. Varm,n                 :comp;
 begin
 readln(n,m);
 if n <= m then
 writeln((2*(n-1)):0:0)
 else
 writeln((2*(m-1)+1):0:0);
 end.
Re: where is wrong? Послано Sergey  21 фев 2003 19:00Thanks a lot. My prog got AC! | 
 | 
|