start.
Return the smallest number of key presses after which the display shows goal.start=3, goal=5 → 2
3 → 6 (double) → 5 (minus one): two presses.
start=6, goal=10 → 2
It pays to decrement first: 6 → 5 → 10. Two presses.
start=9, goal=4 → 5
The number already exceeds the goal and doubling only hurts: press minus one five times.
start=3, goal=5
2
Run checks the first 3 tests in your browser. Submit checks all 98 tests on the server, hidden ones included.