Re: 362 - 18,000 Seconds Remaining
Posted: Thu Sep 29, 2016 3:04 am
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:
-> This code passed right away.
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!
-> This code below was receiving WA:
Code: Select all
printf("%d seconds\n", (int)ceil(bytes/(sum/5.0)));
Code: Select all
printf("%d seconds\n", (int)ceil((bytes * 5.0)/sum));
Hope you guys passed after this!