• + 1 comment

    from collections import *

    n=int(input()) l=list(map(int,input().split())) ans=[] for i in range(0,n+1):

    d=deque(l)
    
    d.rotate(i)
    pr=1
    for j in range(0,len(d)):
        pr=pr+(j+1)*d[j]
    ans.append(pr)
    

    print(max(ans)-1)

    Why does this Solution gives a TLE ?? It can be the easiest amongst all?