Help!!
Can anyone explain me the logic behind this problem https://www.codechef.com/problems/MONEY ??