If i'm not mistaken the maximum input for this problem is 100 and the minimum is 1 (or 0?). I would hope that you would have tested those test cases and verified the answer.