Can you tell me the problem in this code ? I wrote this code in Pascal. It's running OK on ideone.com but I got WA.www.spoj.com/submit/ALCATRAZ1/id=19713570
We cannot see your submitted code. You will either have to give the link on ideone or paste the code in the question.