Submission ID: 24062943 Already taken care of all conditions mentioned in the comments too. Any suggestions @forgotter.
Ignore the extra blank lines shown in the sample input and output - they’re an artifact of the HTML formatting and shouldn’t be there.
Remove the extra readlines and don’t output the blank line between test cases.
@simes spoj should give you some award. You have helped me so many times now. I also keep trying to help others like you do. Thanks again . Another AC