Count Divisors

3.9

1582 votes
Easy
Problem

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\)

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?