I have checked my solution with many inputs but its giving wrong answer please help out with the code http://www.codechef.com/viewsolution/2181785.
@aasthi i dont know java but while checking output with test cases i found that u forgot to print new line after output of every test case
here is ur AC solution
@chandan11111 thanks,it was the actual mistake…
@chandan11111 more and more ppl doing the same mistake…
new users are not aware abt tht
i remember when i submit my first code i did the same mistake