C ++ || MOST EASY BRUTE FORCE
\n# Complexity\n- Time complexity: O(N)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity:O(1)\n Add your space complexity here, e.g. O(n) \n\n#
\n# Complexity\n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int sumOfSquares(vector<int>& nums) {\n        int ans=0;\n        int n = nums.size();\n        for(int i=0;i<n;i++){\n            if(n%(i+1) == 0){\n                ans += nums[i]*nums[i];\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']