Getting W.A. PRLADDU

Getting W.A. while working fine on my compiler…
problem link: http://www.codechef.com/problems/PRLADDU
solution link: http://www.codechef.com/viewsolution/4959035 and another
solution link: http://www.codechef.com/viewsolution/5126834
plz! suggest where I’m getting wrong is there any problem with logic or something else…
if possible …suggest the test cases strongly appreciated…
thanks …

Your Output do not match the actual values. Refer this link: http://ideone.com/LECU7p