But no test case is passing. its working fine on other compilers
Code is working well
@hemantomer1
your code is correct. But you are printing output of all testcase in a single line. Just write cout<<endl; after print(ans); [line no. 87].
Your code will work for all testcases.
1 Like