Hey everyone, could you plz help me in this past contest [problem](https://drive.google.com/file/d/1QB05i-yWxO3da7HfTJrKLrrGldq96CGk/view?usp=sharing) I think this could be done using DP and come you with some states but it doesn't work for every case or maybe this is a simple maths problem. I'm sharing the pdf of the problem state, [link](https://www.techgig.com/codegladiators) of the contest↵
↵
Thanks in advance.
↵
Thanks in advance.