Getting a TLE in testcases

Can someone tell me why I’m getting a TLE.

Link: https://ide.codingblocks.com/s/229198

Thanks!

@kapurm17,
Corrected code, here