Getting WA for alphacode in SPOJ??

This is the solution.Tried all test cases with zeros.Still getting WA

spoj solutions are not public, paste ideone link

try some more testcases if you cannot think of more testcases i would recommend trying some testcases
from match your solution answers on the testcases provided.