Java NZEC: Bytelandian Gold Coins Problem

hello everyone, I am trying to solve this question using Dynamic Programming and memoization in Java. This is working on this problem

http://www.codechef.com/problems/COINS/

and the problem is that my code is working on my computer, I think may be NZEC is because of the inputs, but don’t know what exactly is the problem, please take a look at this code and let me know my mistake.

http://www.codechef.com/viewsolution/5147609

thanks a lot in advance for your effort