|
|
вернуться в форумI get Compile Error Послано meoden 21 апр 2002 21:55 Help!!! This code get Compile Error. Why??? {$r+,n+,q+,b-} var n,k,s,t:longint; begin read(n,k); s:=1; t:=0; for t:=1 to 31 do begin s:=s*2; if s>n then break; if s>k then begin t:=t+(n-s+k-1) div k; break; end; end; writeln(t); end. Help, please!!! Послано meoden 23 апр 2002 18:53 Re: Help, please!!! The online judge use dephi or something like dephi instead of pascal. In this system. if you use i in such condition. You'll get a CE. for example. for i:=1 to 10 do begin i:=i; end; it means that you can't change i in the repetition. Good luck. By the way. your program get a WA after i use while...do instead of FOR Thanks. Послано meoden 9 май 2002 20:25 > The online judge use dephi or something like dephi instead of pascal. > In this system. > if you use i in such condition. > You'll get a CE. > > for example. > > for i:=1 to 10 do > begin > i:=i; > end; > it means that you can't change i in the repetition. > Good luck. > By the way. > your program get a WA after i use while...do instead of FOR |
|
|