C++||Very Easy Solution
\n Describe your first thoughts on how to solve this problem. \n\n\n Describe your approach to solving the problem. \n\n# Complexity\n- Time complexity:O(n)\n A
\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n\n<!-- Describe your approach to solving the problem. -->\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 total=0;\n        int n=nums.size();\n        for(int i=0;i<nums.size();i++){\n            if(n%(i+1)==0)total+=(nums[i]*nums[i]);\n        }\n        return total;\n    }\n};\n```
['C++']