Ugly numbers problem

https://ide.codingblocks.com/s/236649 it is giving one less op value for the input greater then 10 please help

You are supposed to solve this question using the dynamic programming approach…

please help me how to do that

Pls refer to this tutorial for reference : https://youtu.be/78Yx7oLA43s