Least Number of Coins | CodeChef

https://www.codechef.com/viewsolution/30603387

i tried for various testcases and i got correct answers , but still answer is wrong
could somebody plz suggest me where am i wrong
and a test case to show that this solution is wrong :slight_smile:

Test case:

1
5
4 3 10 5 8 
17

Correct output:

3 2

Your output:

3 1
1 Like

Thanks @everule1
I found the mistake. :slight_smile:

I got the correct answer using recursion :+1: