getting wrong answer on spoj but getting right answer on

here is my code. I am getting right answer of the question. But SPOJ is saying that it is wrong answer. So please guide me through it or suggest me anything so that it can get accepted on SPOJ.

What is the question?