Dsa
Math
Medium
Sum of Divisible Numbers
You are given two positive integers a and b. Compute the sum of all integers from 1 to b that are divisible by a. Input consists of two integers separated by space. Output the computed sum.
Example Input:
3 10
Example Output:
18
Key concepts
divisibilitysummationarithmetic
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now