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 thata ≤ x ≤ b and x is divisible by k.
Input
The only line contains three space-separated integers k, a and b (1 ≤ k ≤ 1018; - 1018 ≤ a ≤ b ≤ 1018).
Output
Print the required number.
Sample Input
Input
1 1 10
Output
10
Input
2 -4 4
Output
5
解题思路:
这道题还是收获的,主要在计算从0到n之间2^0,2^1,2^2.......的和;
int sum=0;
for(i=1;i<=n;i=i*2)
{
sum=sum+i;