TLE for 918 div 4 E
Thisis the code I submitted for this ques. Can someone help me understand why TLE is occurring?