Interesting note is that the clever solution fails pretty early: 999999999999999 (15 nines) outputs 16.
I hope the author warned the students about floating point imprecision :P
I hope the author warned the students about floating point imprecision :P
No comments yet.