Contest : Educational Codeforces Round 86 (Rated for Div. 2), Problem — D (Multiple Testcases)
Codeforces submission: https://codeforces.net/contest/1342/submission/78251331
Other IDEs : https://ide.geeksforgeeks.org/eY2UpkI1FI, https://www.onlinegdb.com/B1QJjR7FL
I tried the same in my offline IDE as well. The output is just as expected. On the other hand, codeforces shows a different output. Any idea as to why this happens ?