Trying To Optimize Code But Giving Wrong Answer

Could You Please Look In My Code where I am going wrong I tried to Optimize the code:

Your code is diiferent from the question tag. Please mention the link of the question too.

Money Change Problem:
https://online.codingblocks.com/app/player/39052/content/125462/5203/code-challenge

I cannot able to get quest by this link