Hacker News new | past | comments | ask | show | jobs | submit login

Works even if Kopecks are divisible: say the books value is 7.5, Mash must have 0.5 (7.5 - 7) and Misha 6.5 (7.5 - 1), however now when you combine them they sum to exactly 7.5 not less than, the only way to arrive at less than is if Masha has 0. So its always exactly 7



6.5 + 0.5 is 7.0, not 7.5, so that should be valid.

The book's cost can lie anywhere between [7, 8).


Right on the original typo, but still not convinced, I’ve rephrased to original to try to be clearer


> say the books value is 7.5, Mash must have 1.5 (7.5 - 7) and Misha 6.5 (7.5 - 1), however now when you combine them they sum to exactly 7.5 not less than

There are several problems with this:

- 7.5 - 7 is 0.5, not 1.5

- 1.5 + 6.5 is 8, not 7.5

- 0.5 + 6.5 is still less than 7.5

The problem specifies that 2x - 8 < x. There is no way to constrain this to the specific solution x = 7. Everything would work fine if the book cost -2.6 kopecks.


Thank you :) I’m being very clueless today


6.5 plus 0.5 is 7.0, they don't add up to exactly 7.5.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: