Odd problem in peer section

Can someone plz tell me whether my logic is completely wrong or am I going wrong for some boundary value?
Link to my code is here: CodeChef: Practical coding for everyone Plz hel. Im completely new to codechef and dont have any idea

You are not printing ā€œ\nā€ after the answer of one test case. That is the mistake!!


Sorry to bother you again but can plz help me understand ehy im getting WA for Problem 1(Problem code: CMB01) of peer section. Link to my submission: CodeChef: Practical coding for everyone Thank you in advance again.

Thank you all in advance for your kind help

Thank you it worked :slight_smile: