Coding Blocks IDE

The code for prata problem is working fine on my system or coding blocks ide, but upon submitting it on spoj.com, it says wrong answer.
Can anyone suggest me something?