Search
⌘K

Leetcode 1390. Four Divisors

Given an array of integers (n up to 10^4, values up to 10^5), find elements that have exactly four divisors—which occur only for p^3 or a product of two distinct primes—and return the sum of all their divisors.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.