|
|
back to boardTime limit exceeded?? Help! var p,q:extended; n,i:longint; b:boolean; begin readln(p); readln(q); p:=p*0.01; q:=q*0.01; n:=0;b:=false; repeat inc(n); for i:=1 to n do begin if ((i/n)>=p) and ((i/n)<=q) then begin b:=true; write(n); exit; end; end; until b=true; end. Re: Time limit exceeded?? ok, my name is Xuan Dung, i come from viet nam. so why you don't user C/C++ programm for creat a programm. ok.. do Help! var p,q:extended; n,i:longint; b:boolean; begin readln(p); readln(q); p:=p*0.01; q:=q*0.01; n:=0;b:=false; repeat inc(n); for i:=1 to n do begin if ((i/n)>=p) and ((i/n)<=q) then begin b:=true; write(n); exit; end; end; until b=true; end. |
|
|