Ultra fast mathematician doubt

one test case failed in this code…i cannot find my error…


hope it will help u

The error is only because the result of each test case is not line separated i.e the results of all the test cases prints on the same line. Just cout an endl or “\n” after each iteration in the while loop to solve your issue. Hope this helps.