Tap here to switch tabs
Problem
Submissions

Problem: Minimum Moves to Reach Target Score

med
30 min
Try to solve the Minimum Moves to Reach Target Score problem.

Statement

You start with an integer 11 and your goal is to reach the integer target.

In a single move, you can perform one of the following actions:

  • Increment the current number by 11.

  • Multiply the current number by 22.

You can perform the multiplication action at most maxDoubles times. There is no limit on the number of increment actions.

Return the minimum number of moves needed to reach target starting from 11.

Constraints:

  • 1≤1 \leq target ≤109\leq 10^9

  • 0≤0 \leq maxDoubles ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Moves to Reach Target Score

med
30 min
Try to solve the Minimum Moves to Reach Target Score problem.

Statement

You start with an integer 11 and your goal is to reach the integer target.

In a single move, you can perform one of the following actions:

  • Increment the current number by 11.

  • Multiply the current number by 22.

You can perform the multiplication action at most maxDoubles times. There is no limit on the number of increment actions.

Return the minimum number of moves needed to reach target starting from 11.

Constraints:

  • 1≤1 \leq target ≤109\leq 10^9

  • 0≤0 \leq maxDoubles ≤100\leq 100