Getting WA in spoj AKBAR

My Code: w7KO5Y - Online C++0x Compiler & Debugging Tool -
Problem Statement: - Problem AKBAR

I am getting WA for this problem. I think I have considered all the cases. If there is any cases that I have not considered please tell. Or just share the test cases related to such cases