Python3 Solution
\n\nclass Solution:\n    def sumOfSquares(self, nums: List[int]) -> int:\n        n=len(nums)\n        ans=0\n        for i in range(n):\n            if n%(i+1)
\n```\nclass Solution:\n    def sumOfSquares(self, nums: List[int]) -> int:\n        n=len(nums)\n        ans=0\n        for i in range(n):\n            if n%(i+1)==0:\n                ans=ans+nums[i]**2\n\n        return ans        \n```
['Python', 'Python3']