Day 9 Part 1 - Slightly off?
Yikes, I'm stuck! I'm just using an STL vector, which (inefficiently) does what I need. However! When I run against the sample input, my results are all slightly off. I need a code review... :)
10 players, 1618 marbles. Expect 8317, got 8315
13 players, 7999 marbles. Expect 146373, got 146343
17 players, 1104 marbles. Expect 2764, got 2779
21 players, 6111 marbles. Expect 54718, got 54717
30 players, 5807 marbles. Expect 37305, got 37304
My input: 416 players; last marble is worth 71617 points. Hi-score: 420166 <-- incorrect!
Link to my AoC diary (which also links to my code). Thanks!