On my last contest - we had this problem: iProfits. My team and I found out a solution for this but on one of the cases we get the wrong answer.
What we end up doing is dividing by 0.693. This gives us a number and then to round to the nearest 1000 we add 1000 and then take away the remainder when dividing by 1000 (if the number is not already divisible by 10).
This works nicely but in one case we get a really screwed up answer like:
Quote
2000.0000000000002
Which is not divisible by 1000, so we add 1000 and then subtract the remainder. Giving us the output of 3000 instead of the correct output of 2000.
Does anybody have any thoughts on how to get around this weird problem?


Sign In
Create Account


Back to top









