deljivi
For a given non-negative integers A, B and k, you should print how many numbers from the interval [ A, B ] are divisible by k.
InputThe first line of the standard input contains three non-negative integers A, B and k (0 <= A <= B <= 10^{18}, 1 <= k <= 10^{18}).
OutputIn the first and the only line of the standard output you should print how many integers from the interval [ A, B ] are divisible by k.
Note:
in 10% of the test cases will hold B, k <= 1.000.
in 50% of the test cases will hold B <= 10.000.000.
Input:
Output:
Explanation:
The numbers divisible by 3 from the interval [11, 20] are: 12, 15 and 18.
11 20 3Output:
3Explanation:
The numbers divisible by 3 from the interval [11, 20] are: 12, 15 and 18.
Input:
Output:
Explanation:
All the numbers from the interval [100, 222] are divisible by 1.
100 222 1Output:
123Explanation:
All the numbers from the interval [100, 222] are divisible by 1.
Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.