Could you please check my code I am getting compilation and TLE error.
Please suggest some way to write more optimized code for this problem.
Google Drive link :
Please check my code here: https://drive.google.com/file/d/11ki2ioZpkYittZ5RiPRqEcINy0LgpQlG/view?usp=sharing
Screenshot of pycharm (code is working fine in pycharm ide ): https://drive.google.com/file/d/1qj0CaYzv9VyGhruwJp0sKcWFqYuXqk7c/view?usp=sharing