|
|
вернуться в форумfrenky_u@i.com.ua post me test for problem 1011 pls Program g; var p,q:real; x,i:longint; bugy:boolean; begin {find function round} read(p,q); {p:=round(p/0.01)*0.01; q:=round(q/0.01)*0.01;} p:=(int(p/0.01))*0.01; q:=(int(q/0.01))*0.01; {writeln(p); writeln(q); } if (p>=0.01)and(q<100) then begin if (p<q) then begin bugy:=false; x:=-1; repeat x:=x+1; for i:=0 to x do {while i<=x do begin} if (i>x*p/100)and(i<x*q/100) then bugy:=true; {i:=i+1;end;} until (bugy=true); writeln(x); end {else writeln(0);} end{ else } { writeln('rong');} { writeln(q);} {writeln(0);} end. {why wrong answer} |
|
|