Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/integer-oraliqdagi-karralilar

Multiples in a range

Medium 1000 ms 64 MB 40%
Share

Positive integers $a$, $b$ and $k$ are given. Find how many of the numbers from $a$ to $b$ (including $a$ and $b$) are divisible by $k$ without a remainder. For example, with $a = 10$, $b = 25$, $k = 5$ they are $10, 15, 20, 25$ — $4$ in total.

The count of multiples of k in a range

Input

One line with three positive integers: $a$, $b$ and $k$.

Output

One integer — the number of multiples of $k$.

Note

$1 \le a \le b \le 10^{9}$
$1 \le k \le 10^{9}$

Examples

Input #1
10 25 5
Output #1
4
Input #2
11 14 5
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.