|
|
вернуться в форум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. Try this: 1 15 The correct answer should be 0 and answer of your programm is 4. Good luck :) Edited by author 03.11.2009 22:00 |
|
|