396. Rotate Function


https://leetcode.com/problems/rotate-function



Time Limit Exceeded


```python
class Solution:
    def maxRotateFunction(self, nums: List[int]) -> int:
        #2:08
        f_output_list = []
        index = -1
        for _ in range(len(nums)):
            value = 0
            for a in range(len(nums)):
                index = (index + 1) % len(nums)
                b = nums[index]
                value += a*b
                #print(a,b)
            f_output_list.append(value)
            index = (index - 1) % len(nums)
        return max(f_output_list)
        #2:14
        #debug until 2:17
```
