← back to unit
Challenge
# puzzle gauntlet advanced
The Odometer Rolls
The bike odometer shows digits on little wheels. Add 1 — and sometimes a wheel rolls over and carries into the next: 199 becomes 200, and 999 grows a whole new wheel! 🚲
You get the odometer's digits (comma-separated, left to right). Add one and print the new digits, joined into one number-string.
Example:
Input: digits = [1, 9, 9]
Output: 200
The last two 9s roll over to 0 and carry left, bumping the 1 up to 2 — giving 200.
💡 need a hint?
pg-odometer-rolls.py🔒 given lines are locked — write your code in between
loading...