i have submitted the code in contest and it was accepted(even the solution was not hacked) and when i submitted the same code in pypy3 it was accepted.Then i saw others solution i found that everyone was having same complexity as me and submitted in python 3 only and their solution was accepted. question- https://mirror.codeforces.com/contest/1675/problem/B my contest submition — https://mirror.codeforces.com/contest/1675/submission/155950529 my pypy3 submition- https://mirror.codeforces.com/contest/1675/submission/156065421 a correct submition for referrence- https://mirror.codeforces.com/contest/1675/submission/156006177