2778. Sum of Squares of Special Elements
You are given a 1-indexed integer array
numsof lengthn.An element
nums[i]ofnumsis called special ifidividesn, i.e.n % i == 0.Return the sum of the squares of all special elements of
nums.
1 | class Solution { |