Wrong Answer

why getting WA??

question-link text

solution-link text

can anybody help me???why am i getting WA??

I checked your code and it seems to be perfectly correct. I think your solution is right, there seems to be some problem with testcases. Someone has commented in editorial that many people are getting wrong answer, something is fishy there.

//