Mistake in concept/code

I understood the concept of Parata problem . I also ran few test case…provided on spoj.com.
However my code is getting rejected when I am trying to submit it on spoj.com
Can You please tell where is my code failing…or what is wrong in my code
Link to code
https://ide.codingblocks.com/s/357129

hi @gaganwalia212 what error are you getting? if it is TLE then try using fast i/o

Ma’am It is showing wrong answer…
I have used printf and scanf in for fast i/o

@gaganwalia212 can you show a screenshot of the submission?

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.