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

use extended,not real.
Posted by panfei 22 Oct 2008 07:00
1、Use extended,not real,and you'll get AC.
If you want to know why,you can readln some real like 100/100 and use WATCH to check it in the program.You may find that the number change to someting like"1.0000000001"or"0.99999999998".

2、Take care of the description:less than q%.Less than!!!!
So:if trunc((i*q/100))=(i*q/100) then continue;
Re: use extended,not real.
Posted by dd (mp dpt USTU) 22 Oct 2009 12:59
use integer, not float
then EPS = 1/50000 (if p = P*500, q = Q*500, else if for p and q to take a multiplier smaller, for example 200 and to divide on 20000, we will receive WA 22 (40 -> WA 23))