Four Divisors
Given an integer array nums, return the sum of divisors of the integers in that array that have exactly four divisors. If there is no such integer in the array, return 0.
Example 1
Input
nums = [21,4,7]Output
32Only 21 has exactly four divisors, and its divisors 1, 3, 7, and 21 sum to 32.
Example 2
Input
nums = [21,21]Output
64Each 21 has exactly four divisors summing to 32, so the total is 64.
Constraints
- 1 <= nums.length <= 10^4
- 1 <= nums[i] <= 10^5