Codeforces div 3 problem E1

why my code is giving TLE
problem link-https://codeforces.com/contest/1399/problem/E1
solution link-https://codeforces.com/contest/1399/submission/89089825