please tell me why i am getting WA while it is giving the correct output for every test case i have checked…help me i am new here…

here is the question : http://www.codechef.com/problems/COINS

here is the solution : http://www.codechef.com/viewsolution/3492017

# Getting WA

**dpnkr**#1

The Solution to the above problem is recursive. For any exchange of coins for n there are three possible coins i.e. n/2, n/3, n/4. You are just checking whether n/2, n/3, and n/4 has a sum greater than n or not. But then these three numbers n/2, n/3 and n/4 can further be formed by three other numbers and hence you need to recursively call the method to get the maximum value.