题库练习 Divisibility
← 上一题 下一题 →

A10142 | Divisibility

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

Find the number of $k$ -divisible numbers on the segment $[a,b]$ . In other words you need to find the number of such integer values $x$ that $a<=x<=b$ and $x$ is divisible by $k$ .

输入格式

The only line contains three space-separated integers $k$ , $a$ and $b$ ( $1<=k<=10^{18};-10^{18}<=a<=b<=10^{18}$ ).

输出格式

Print the required number.

输入输出样例

输入 #1
1 1 10
输出 #1
10
输入 #2
2 -4 4
输出 #2
5
C++ 编辑器
输入
输出