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

1011
Posted by JIeHuH*CCCP 26 Oct 2006 16:13


Edited by author 26.10.2006 22:10
Re: 1011
Posted by Nechaev Ilya (Rybinsk SAAT) 26 Oct 2006 19:14
Use standart input and output (see FAQ).
Then you get WA 17 =)
Re: 1011
Posted by JIeHuH*CCCP 26 Oct 2006 22:13
Yes. Test #17. What's wrong? What is the test?

PS: Wellcome to the men from RSAAT!
Re: 1011
Posted by JIeHuH*CCCP 26 Oct 2006 22:20
{$N+}
var
  a:longint;
  p,q,k:extended;
begin
  read(p,q);
  p:=p/100;
  q:=q/100;
  a:=-1;
  repeat
    inc(a);
  until (trunc(a*q-0.0000000000000001)-trunc(a*p+0.0000000000000001))>0;
  write(a);
end.

My new solution is AC! Whatever thx!
Re: 1011
Posted by syc 14 Nov 2006 14:34
Why are -0.0000000000000001 and +0.0000000000000001 necessary?
Re: 1011
Posted by JIeHuH*CCCP 15 Nov 2006 04:33
I realy dont know why +0.0000000000000001 is necessary, but i undersand why the -0.0000000000000001 is.

I asked admins about this (http://acm.timus.ru/forum/thread.aspx?id=14018&upd=632991617525165000)