Write sum_of_multiples(a, b, limit) that returns the sum of all positive integers below limit that are divisible by a or by b (or both). Count each number once.
Examples
Input: a = 3, b = 5, limit = 10
Output: 23
Explanation: 3 + 5 + 6 + 9 = 23.
Input: a = 2, b = 4, limit = 10
Output: 20
Input: a = 3, b = 5, limit = 1
Output: 0
Constraints
1 <= a, b <= 10000 <= limit <= 2 * 10**5
Goals
- Combine two divisibility tests with `or`
- Accumulate a sum over a range