Not passing one test case

please tell how to resolve

you just need to give calls to function with values n/2 , n/3 , n/x … and return the best possible answer.
Use memoization.

https://pastebin.com/PEHRFhqj

dude i have done exactly the same thing but still getting wrong in one ans

Seems like you have shared the wrong link.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.