This has happened to me twice, where 1 index hashing is getting TLE but 0 index hashing with same logic is getting Accepted. Not sure if it's python issue or hashing complexity.
TLE — https://mirror.codeforces.com/contest/1701/submission/163370464
Accepted — https://mirror.codeforces.com/contest/1701/submission/163370574
TLE — https://mirror.codeforces.com/contest/1702/submission/163995656
Accepted — https://mirror.codeforces.com/contest/1702/submission/163996134