Search
⌘K

Leetcode 2652. Sum Multiples

Compute the sum of all integers in [1, n] that are divisible by 3, 5, or 7. A common approach uses inclusion–exclusion with arithmetic-series sums to count multiples without double-counting.


Question Timeline

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

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