362 - 18,000 Seconds Remaining

All about problems in Volume 3. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Filipe Herculano
New poster
Posts: 2
Joined: Thu Sep 29, 2016 2:52 am

Re: 362 - 18,000 Seconds Remaining

Post by Filipe Herculano »

Hi dudes, remember that when you are doing a division, you are losing some data. And as we don't know which test case is The Tricky one, we should not trust so much on divisions. For example, I received 3 WA before changing a silly thing.

-> This code below was receiving WA:

Code: Select all

printf("%d seconds\n", (int)ceil(bytes/(sum/5.0)));
-> This code passed right away.

Code: Select all

printf("%d seconds\n", (int)ceil((bytes * 5.0)/sum));
The difference between the two is simple: I'm not doing two divisions, just one! Somewhere deep down in the card tests there is one little motherf*cker that is not going up one integer and stays at the wrong answer.

Hope you guys passed after this!
Post Reply

Return to “Volume 3 (300-399)”