Question: Bob is given a non negative number N and he is expected to bring that number to 0 . He can perform any of the

Bob is given a non negative number N and he is expected to bring that number to 0.He can perform any of the 2 operations on N in each move: 1: if we take 2 integers a and b where N=a*b then we can change N=max(a,b)2: decrease the value of N by1. Determine the minimum number of moves required to reduce the value of N to 0. Example : Input -3, Output-3 Explanation 3->2->1->0 Input format The only line of input format contains a non negative number N Output format For each test case , determine the minimum number of moves required to reduce the value of N to 0 Constraints 0<= N <=10^6 Sample input 13 Sample output 13 Explanation 3->2->1->0 Sample input 213 Sample output 25? Explanation 13->12->4->2->1->0 Execution time limit 2seconds Write a python program to execute this.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!