Comments

Ok, I got it. Thanks for your suggestion.

They aren't same.This was actually my bad.but I got AC with almost same as first code I wrote. And I was getting right output in my editor but got wrong in the judge for the given test case.

Why I got 5 times WA for problem A and got AC with same code afterwards without changing anything ?