Count Divisors
Practice
3.9 (1586 votes)
Easy
Problem
88% Success 179207 Attempts 10 Points 1s Time Limit 256MB Memory 1024 KB Max Code
You have been given 3 integers - l, r and k. Find how many numbers between l and r (both inclusive) are divisible by k. You do not need to print these numbers, you just have to find their count.
Input Format
The first and only line of input contains 3 space separated integers l, r and k.
Output Format
Print the required answer on a single line.
Constraints
\( 1 \le l \le r \le 1000 \)
\( 1 \le k \le 1000\)
Code Editor
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Submissions
Please login to view your submissions
Similar Problems
Points:10
456 votes
Tags:
Basic ProgrammingEasyInput/Output
Points:10
750 votes
Tags:
Basic ProgrammingEasyInput/Output
3.Zoos
Points:10
1159 votes
Tags:
Basic ProgrammingInput/Output
Editorial
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor