Showing wrong ans

when i submit on spoj showing wrong ans
code- https://ide.codingblocks.com/s/284813

question- https://www.spoj.com/problems/EXPEDI/

why is my code printing ans twice
code-https://ide.codingblocks.com/s/285342
i checked it like 100 of time used if else and lot of things but still cant work

@chhavibansal
code-https://ide.codingblocks.com/s/285342

image
sorry i missed ur notification
extremely sorry for the delay these 2 continue stmt were not written

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.