[C#] | O(N) | 0 ms | 100%
Approach
An element nums[i] of nums is called special if nums.Length % element number == 0 (Elements are counted from number 1).
We need to find the sum of squa
# Approach
- An element `nums[i]` of `nums` is called special if `nums.Length % element number == 0` (Elements are counted from number 1). 
- We need to find the sum of squares of all special elements of `nums`. 
- Hence, if the element satisfies the conditions, we add its square to the `sum`. After traversing the array we return the `sum`.
# Complexity
- Time complexity: **O(n)**

- Space complexity: **O(1)**

# Code
```csharp []
public class Solution 
{
    public int SumOfSquares(int[] nums) 
    {
        int sum = 0;
        for (int i = 0; i < nums.Length; i++)
        {
            if (nums.Length % (i + 1) == 0)
                sum += nums[i] * nums[i];
        }
        return sum;
    }
}
```
---
Thank you for reading my post. Please upvote it! ✔️
---
['Array', 'Enumeration', 'C#']