1MS || ✅🔥BEATS 100% PROOF🔥 || 💡CONCISE CODE✅ || 🌟JAVA || 🧑‍💻 BEGINNER FREINDLY
Code
![Screenshot 2025-01-13 173852.png](https://assets.leetcode.com/users/images/6efc10ea-09cf-4cb7-b796-03a65c2af1c5_1736935957.6704464.png)


# Code
```java []
class Solution {
    public int sumOfSquares(int[] nums) {
        int n = nums.length;
        int ans = 0;

        // Check if i is a divisor of the array length n
        for (int i = 1; i <= nums.length; i++) {
            if (n % i == 0) {
                ans += nums[i - 1] * nums[i - 1];
            }
        }

        return ans;
    }
}
```
![7b3ed9e7-75a3-497e-85ef-237ed4f4fef7_1735690315.3860667.png](https://assets.leetcode.com/users/images/793a6b5a-1638-4a30-94a9-58481c670d7c_1736935984.6027646.png)

['Java']