Why my code is failing for the sample test case while I see correct output in other ides?

Here is my code link:




Please help.

Hey @thirumeni.m07
Remove them

// #ifndef ONLINE_JUDGE
// freopen(“input.txt”, “r”, stdin);
// freopen(“output.txt”, “w”, stdout);
// #endif

And ur code will work fine :slight_smile:
If this resolves ur query then please mark it as resolved :slight_smile: