2462.Divisibility

Time Limit: 1s Memory Limit: 256MB

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 \le x \le b and x is divisible by k.

Input Format(From the terminal/stdin)

The only line contains three space-separated integers k, a and b (1 \le k \le 1018;-1018 \le a \le b \le 1018).

Output Format(To the terminal/stdout)

Print the required number.

Sample Input 1

Copy
1 1 10
 · ·  \n

Sample Output 1

Copy
10
  \n

Sample Input 2

Copy
2 -4 4
 ·  · \n

Sample Output 2

Copy
5
 \n

Submit

请先 登录

© 2025 FAQs