跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F1496. Divisibility

    ID: 1502 传统题 2000ms 256MiB 尝试: 0 已通过: 0 难度: 4 上传者: 标签>数学进阶难度共享题库Codeforces英文题面题目来源题面语言

Divisibility

题目描述

A. Divisibility
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

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 axb and x is divisible by k.

Input

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

Output

Print the required number.

Examples
Input
1 1 10
Output
10
Input
2 -4 4
Output
5

题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 1005 题。保留原作者与原赛事署名。