|
|
вернуться в форумWA????????????? Послано Oleg 2 дек 2002 14:44 var i,j,k,n,m:longint; begin while true do begin read(n); if n =0 then halt(0); read(m); if n=1 then k:=1 else k:=0; while n<>1 do begin dec(n); m:=(m div 2) + (m mod 2); inc(k); end; m:=m-1+k; writeln(m); end; end. Re: WA????????????? Послано Azrael 7 дек 2002 01:35 Because answer at 2 1000 is not 500:)) It's about 47 (can't remember exectly) can`t remember exectly Послано Oleg 7 дек 2002 19:16 why??????????????????????? WA HELP PLEASE Послано Oleg 15 дек 2002 09:22 var i,j,k,n,m:longint; begin while true do begin read(n); if n =0 then halt(0); read(m); if n=1 then k:=1 else k:=0; while n<>1 do begin dec(n); m:=(m div 2) + (m mod 2); inc(k); end; m:=m-1+k; writeln(m); end; end. Re: WA HELP PLEASE Послано Azrael 15 дек 2002 22:51 Watch my previous message. Read task. wy 2 1000 =47?????? Послано Oleg 17 дек 2002 09:19 > Watch my previous message. > Read task. Re: wy 2 1000 =47?????? You are wrong! 2 1000 = 45 |
|
|