ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1011. Conductors

Time limit exceeded??
Posted by zsyzYYK 7 Feb 2009 14:03

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??
Posted by phandungdtx10 12 Apr 2011 22:46
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
zsyzYYK wrote 7 February 2009 14:03
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.