Easy solution || O(n) || Brute Force
Approach\n Describe your approach to solving the problem. \nBrute force\n# Complexity\n- Time complexity:O(n)\n- Space complexity:O(n)\n# Code\n\nclass Solution
# Approach\n<!-- Describe your approach to solving the problem. -->\nBrute force\n# Complexity\n- Time complexity:$$O(n)$$\n- Space complexity:$$O(n)$$\n# Code\n```\nclass Solution {\npublic:\n    int sumOfSquares(vector<int>& nums) {\n        int sum=0;\n        for(int i=1;i<=nums.size();i++)\n        {\n            if(nums.size()%i==0)\n            sum+=(nums[i-1]*nums[i-1]);\n        }\n        return sum;\n    }\n};\n```
['C++']