Count Multiples In Range
Computer Mathematics
Medium
3 views
Problem Description
Given L R k, count integers in [L,R] divisible by k.
Input Format
Three integers L R k.
Output Format
One integer count.
Official Solution
Count = floor(R/k) - floor((L-1)/k). Use integer division.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!