Computer Science, asked by Jebaannie, 7 months ago

Given a number N and three operations (divide by 3, divide by 2, subtract by 1), find the minimum only if the number is multiple of divisor. [Note: greedy will be incorrect and BFS will be exponentia

Example:. N = 10; 10-1 = 9, 9/3 = 3, 3-1 = 2, 2/2 = 1, 1-1 = 0. Total 5 steps. =

Sample input 1

5

sample output

4​

Answers

Answered by kiranmayeereddy
0

Answer:

this question I had never seen please say me for which class and which lesson you gave it

Similar questions