Python Easy Solution
Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(1)\n\n# Code\n\nclass Solution:\n    def sumOfSquares(self, nums: List[int]) -> int:\n        n=l
# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution:\n    def sumOfSquares(self, nums: List[int]) -> int:\n        n=len(nums)\n        tot=0\n        for i in range(1,n+1):\n            if n%i==0:\n                tot+=nums[i-1]**2\n        return tot\n```
['Python3']