I didnt understand the question there is no explanation for the given sample test data…PLz explain the question and also how we reached at the given answer for input 12?
Exchanging Coins
Hey @aryamaan1011
12 can be exchanged for 12/2==6 ,12/3==4,12/4==3
So we have three coins now 6,4,3
now then can be directly sold for 6+4+3 =13 grams of gold
I hope this resolves your query.