Why is it that I get a WA despite getting a correct output ?

Post your submission link

My submission ____--

@manas124 Use n >= 10 instead of n > 10 in the while loop. Think why :slight_smile:

1 Like

cout << n + k << “\n” (or) cout << n + k << endl;
BECAUSE for each test case the answer should be in new line
and yes as @neelanshmathur said keep n >= 10 and if u don’t understand why n >= 10
you can come here again we’ll help you.

1 Like