eolymp
bolt
Try our new interface for solving problems
Problems

Between A and B

Between A and B

Given nonnegative integers $a$ and $b~(a \le b)$ and positive integer $x$. How many numbers are there between $a$ and $b$ inclusively, divisible by $x$? \InputFile Three numbers $a, b$ and $x~(0 \le a \le b \le 10^{18}, 1 \le x \le 10^{18})$. \OutputFile Print the answer to the problem.
Time limit 1 second
Memory limit 128 MiB
Input example #1
5 10 3
Output example #1
2
Author Rashad Mammadov, Abutalib Namazov
Source Azərbaycan 2019: Yuxarı yaş olimpiada hazırlığı qrupuna seçim turu