So i was solving a problem named Cosmic Table and i’m getting a stubborn TLE on test 12 while submitting. My code is correct and is also correct in terms of time complexity. It should have passed but it does not.
Can someone please help me find out why is my code getting TLE, even after its Time Complexity is correct.
My Submission (TLE)