| 
 | 
вернуться в форумWhy got WA?! var   d: longint;   N,K: longint;   time: longint;   rest: longint;   //flag: boolean; begin   { TODO -oUser -cConsole Main : Insert code here }   readln(N,K);   time:=0;   d:=1;   while d<=K do    begin      inc(time);      d:=d+d;    end;   rest:= N-d;   time:=time+((rest+k-1) Div k);   writeln(time);   //readln; end. Re: Why got WA?! Послано  Yuri 3 май 2006 19:02 Try this: 1 15 The correct answer should be 0 and answer of your programm is 4. Good luck :) Re: Why got WA?!     Edited by author 03.11.2009 22:00  |  
  | 
|