About 2AM, time to go to bed, but first an update on my programming puzzles.
Here’s how 10137 went:
- Wrong Answer
- Forgot dollar signs. Oops. Wrong answer.
- Floating point precision issue. Wrong answer.
- Changed rounding strategy. Solved.
My solution is available, once again. This problem pissed me off, because a lot of stuff depended on the interpretation to correctness and rounding. Not really a problem worth doing, I don’t think.
706 fared a little better in terms of time spent tracking down the issue, but the mistakes were embarassing:
- Wrong answer.
- Switched from mod/div reduction to string character splitting to get around zero prefixes. Wrong answer.
- Dumb spacing mistake. Learn to read the spec. Wrong answer.
- Different dumb spacing mistake. Learn to read the spec. Wrong answer.
- Oh. Right. Debug code been there all along. Stupid stupid stupid. Wrapped in ONLINE_JUDGE macro. Solved.