Please tell why is this giving TLE

Please see my code and tell why is it giving TLE?
http://p.ip.fi/J2Zo

hello @rohitgarg025
check value of n and t.
n=10^8 ,t=10 (in worst case)

ur solution time complexity is O(t*n) = O(10^9)
which is equivalent to 10sec and that is why u r getting tle.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.