|
|
back to boardwhere is wrong? Posted by Sergey 21 Feb 2003 00:53 var 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 then try m<n instead (+): I think my short Ac helps you. Var m,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? Posted by Sergey 21 Feb 2003 19:00 Thanks a lot. My prog got AC! |
|
|