COINS problem - WA

Hi all. So I’m getting Wrong answer for the Bytelandian gold coins problem. Kindly let me know what’s wrong with my code

Problem

My Solution