Problem:


Score : 200 points

Problem Statement

You are given nonnegative integers a and b (a ≤ b), and a positive integer x.
Among the integers between a and b, inclusive, how many are divisible by x?

Constraints

0 ≤ a ≤ b ≤ 10^{18}

1 ≤ x ≤ 10^{18}

Input

The input is given from Standard Input in the following format:

a b x

Output

Print the number of the integers between a and b, inclusive, that are divisible by x.

Sample Input 1

4 8 2

Sample Output 1

3

There are three integers between 4 and 8, inclusive, that are divisible by 2: 4, 6 and 8.

Sample Input 2

0 5 1

Sample Output 2

6

There are six integers between 0 and 5, inclusive, that are divisible by 1: 0, 1, 2, 3, 4 and 5.

Sample Input 3

9 9 2

Sample Output 3

0

There are no integer between 9 and 9, inclusive, that is divisible by 2.

Sample Input 4

1 1000000000000000000 3

Sample Output 4

333333333333333333

Watch out for integer overflows.



Sample input:
4 8 2


Sample output:
3

Submission status: Runtime Error

Solution code:
a,b,x=map(int, input().split())
count_n=0
for i in range(a,b+1):
	if i%2==0:
    count_n+=1
print(count_n)

Submission status: Runtime Error

Solution code:
fn main() {
    let v = read_vec::<u64>();
    let a = v[0];
    let b = v[1];
    let x = v[2];
    let extra = if a % x == 0 { 1 } else { 0 };
    println!("{}", b / x - a / x + extra);
}

#[allow(dead_code)]
fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}
#[allow(dead_code)]
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}
#[allow(dead_code)]
fn read_vec2<T: std::str::FromStr>(n: u32) -> Vec<Vec<T>> {
    (0..n).map(|_| read_vec()).collect()
}
#[allow(dead_code)]
fn yn(result: bool) {
    if result {
        println!("Yes");
    } else {
        println!("No");
    }
}

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())

print(k*(k-1)**(n-1))

Submission status: Runtime Error

Solution code:
def w(p, c):
  return p // c

A,B,X = map(int, input().split())
print(w(B)-w(A-1))

Submission status: Runtime Error

Solution code:
a,b,x=[int(i) for i in input().split())]
print((b-a)//x)

Submission status: Runtime Error

Solution code:
a,b,x = map(int,input().split())
def f(p):
    q = p//x
ans = f(b) - f(a-1)
print(ans)

Submission status: Runtime Error

Solution code:
a,b,x=[int(i) for i in input().split()]
count=0
count=[_ for i in range(a,b+1) if i%x==0]
print(len(count))
'''for i in range(a,b+1):
    if(i%x==0):
        count+=1
print(count)'''

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())
ls = list(range(a, b+1))
count = [i % x for i in ls].count(0)

print(count)

Submission status: Runtime Error

Solution code:
 import math

a, b, x = map(int, input().split())

if a == b:
    if a % x == 0:
        print(1)
    else:
        print(0)

elif a % x == 0:
    print(math.ceil((b - a) // x) + 1)
else:
    print(math.ceil((b - a) // x))

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
    a, b, x = map(int, input().split())
    if x > b:
        print(0)
    else:
        found = False
        i = a
        counter = 0
        while i < b + 1:
            if not found and i % x != 0:
                i += 1
            else:
                i += x
                counter += 1
    print(counter)

Submission status: Runtime Error

Solution code:
from math import ceil
if __name__ == "__main__":
    a, b, x = map(int, input().split())
    if x > b:
        print(0)
    else:
        found = False
        i = a
        counter = 0
        while i < b + 1:
            if not found and i % x != 0:
                i += 1
            else:
                break
    print(ceil((b  + 1 - i)/x))

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
ans=k
for i in range(n-1):
    ans=ans*(k-1)
print(ans)

Submission status: Runtime Error

Solution code:
a,b,x = map(int,input().split())
n = 0
for i in range(a,b+1):
  if x % i == 0:
    n += 1
  else:
    pass
print(n)

Submission status: Runtime Error

Solution code:
#-*- coding:utf-8 -*-
a,b,x=map(int,input().split())

count=0
if x<=b and a!=b:
  Base=0
  for i in range(a,b+1):
    if i%x==0:
      Base=i
      break
  for j in range(Base,b+1,Base):
     count+=1
elif a==b and a%x==0:
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
a,b,x=map(int,input().split())

for in range(a,b+1):
  if i%x==0:
    Base=i
    break
count=1
num=2
while Base<=b:
  Base*=num
  count+=1
    
print(count)

Submission status: Runtime Error

Solution code:
a,b,x = map(int,input().split())

for i in range(a,b+1):
    if i % x == 0:
        break
else:
    print(0)
    exit()

for j in range(b,a+1,-1):
    if j % x == 0:
        break

cnt = (j-i) // x + 1
print(cnt)

Submission status: Runtime Error

Solution code:
import sys

a,b,x = map(int,input().split())

for i in range(a,b+1):
    if i % x == 0:
        break
else:
    print(0)
    sys.exit()

for j in range(b,a+1,-1):
    if j % x == 0:
        break

cnt = (j-i) // x + 1
print(cnt)

Submission status: Runtime Error

Solution code:
a, b, x = map(int,input().split())
print((b//x-a//x)

Submission status: Runtime Error

Solution code:
a, b, x = map(int input().split())
print(b//x - a//x)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
int main()
{
	long long a,b,x,m,n;
	cin>>a>>b>>x;
	m=a/x;
	if(a%x!=0)
		m++;
	n=b/x;
	cout<<n-m+1<<endl;
	return 0;
}

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
long long a,b,x,ans,temp;
int main()
{
    cin>>a>>b>>x;
    if(a%x==0) ans=a/x;
    else	ans=a/x+1;
    temp=b/x;
    cout<<temp-ans+1;
    return 0; 
}

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
long long a,b,x,s,e;
int main()
{
    cin>>a>>b>>x;
    if(a%x==0)
	{
		s=a/x;
	}
    else
	{
		s=a/x+1;
	}
    e=b/x;
    cout<<e-s+1;
    return 0;//求过！！！！！！！！！！！ 
}

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
long double a,b,x;
long double ans,temp;
int main()
{
    cin>>a>>b>>x;
    if(a%x==0)
	{
		ans=a/x;
	}
    else
	{
		ans=a/x+1;
	}
    temp=b/x;
    cout<<temp-ans+1;
    return 0;
}

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
long long a,b,x;
long long ans,temp;
int main()
{
    cin>>a>>b>>x;
    if(a%x==0)
	{
		ans=a/x;
	}
    else
	{
		ans=a/x+1;
	}
    temp=b/x;
    cout<<temp-ans+1;
    return 0;
}

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define int long long
using namespace std;
int a,b,x;
signed main()
{
    cin>>a>>b>>x;
    printf("%lld",!(a%x)?b/x-a/x+1:b/x-a/x);
	//借鉴题解大佬思路
    return 0;
}

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define int long long
using namespace std;
int a,b,x;
main()
{
    cin>>a>>b>>x;
    printf("%lld",!(a%x)?b/x-a/x+1:b/x-a/x);
	//借鉴题解大佬思路
    return 0;
}

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
long long a,b,x;
int main()
{
    cin>>a>>b>>x;
    printf("%lld",!(a%x)?b/x-a/x+1:b/x-a/x);
	//借鉴题解大佬思路 
    return 0;
}

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
int main()
{
	long long a,b,x;
    cin>>a>>b>>x;
    printf("%lld",!(a%x)?b/x-a/x+1:b/x-a/x);
	//借鉴题解大佬思路
    return 0;
}

Submission status: Runtime Error

Solution code:
/*
	Suvash Kumar SUMON
	B.Sc. Engineering
	Dept. of Computer Science & Engineering (CSE)
	University of Rajshahi
	suvashsumon@outlook.com
*/

#include<bits/stdc++.h>
#define congrats_bro_you_solved_it return 0;
#define cholo_suru_kora_jak() int main()

using namespace std;

int countDivisibles(long long int A, long long int B, long long int M) 
{ 
    
    if (A % M == 0) 
        return (B / M) - (A / M) + 1; 
  
    
    return (B / M) - (A / M); 
} 

cholo_suru_kora_jak()
{
	long long int a, b, c, count=0;
	cin>>a>>b>>c;
	long long int ans = (b /c) - ((a - 1)  / c);
	//cout<<countDivisibles(a,b,c);
	cout<<ans;
	congrats_bro_you_solved_it;
}

Submission status: Runtime Error

Solution code:
a,b,x = map(int,input().split())

aaa =list(range(a,b+1))
#print(aaa)
cnt =0

for i in aaa:
    if i % x ==0:
        cnt+=1
    else :
        pass

print(cnt)

Submission status: Runtime Error

Solution code:
a,b,x = map(int,input().split())

aaa =list(range(a,b+1))
#print(aaa)
cnt =0

for i in aaa:
    if i % 2 ==0:
        cnt+=1
    else :
        pass

print(cnt)

Submission status: Runtime Error

Solution code:
a,b,x = map(int,input().split())

aaa =list(range(a,b+1))
print(aaa)
cnt =0

for i in aaa:
    if i % 2 ==0:
        cnt+=1
    else :
        pass

print(cnt)

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())
count:int=0
for i in range(a, b+1):
    if i%x==0:
        count+=1
print(count)

Submission status: Runtime Error

Solution code:
a,b,x=map(int,input().split())
res=0
s=int(a-a%x)
if a%x!=0:
  s+=x
t=int(b-b%x)
l=list(range(s,t+1,x))
print(len(l))

Submission status: Runtime Error

Solution code:
a,b,x=map(input().split())
res=0
for i in range((a-a%x)+x,(b-b%x)/x+1,x):
  res+=1
print(res)

Submission status: Runtime Error

Solution code:
a, b, n = map(int, input().split())
print(b // x - (a - 1) // x)

Submission status: Runtime Error

Solution code:
a,b,x=map(int,input().split())
print(b//x-a//a+1)

Submission status: Runtime Error

Solution code:
import sys
veces= list()
lines = sys.stdin.readlines()
for linea in lines:
    c = linea.split()
    c = list(map(int,c))
list(c)

rango = range(c[0],c[1]+1)
j = list(rango)
for l in range(len(j)):
  division = j[l]%c[2]
  if division == 0:
    veces.append(division)

print(int(len(veces)))

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
a = input().split()
a_sum = 0

for i in range(n):
    a_sum += int(a[i])

tolerance = -(-(n * x) // 2)
result = a_sum - tolerance
if int(a[0]) > x:
    result += 1
if int(a[0]) > x and int(a[n-1]) > x:
    result -= 1
if result < 0:
    print("0")
else:
    print(result)

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())
n = 0
for i in range(a, b+1):
  if i%x == 0:
    p = i
    n += 1
    break

while p < b:
  p += x
  n += 1

n -= 1
print(n)

Submission status: Runtime Error

Solution code:
a,b,x = map(int, inpu().split())
na = (a-1) // x + 1
nb = b // x + 1
print(nb-na)

Submission status: Runtime Error

Solution code:
a,b,x = map(int, input().split())
cnt = 0

for i range(a,b):
    if i % x == 0:
        cnt += 1

print(cnt)

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())
ans = 0
if a == 0: ans = b/x + 1
else: ans = b/x - (a-1)/x
print ans

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())

count = 0
n = a
while n <= b:
    if n % x == 0:
        count = count + 1
        n = n + x
   	else:
        n = n + 1

print(count)

Submission status: Runtime Error

Solution code:
import math

a, b, x = map(int, input().split())

print(b // x - (a - 1) // x))

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
print(b//x-(a-1)//x)

Submission status: Runtime Error

Solution code:
print(b//x-(a-1)//x)

Submission status: Runtime Error

Solution code:
list = int(input().split())
a = int(list[0] / list[2])
b = int(list[1] / list[2])
ans = a - b
if list[0] % list[2] == 0:
  ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
list = []
cnt = 0
for i in range(3):
  list.append(int(input()))
a = list[0]
b = list[1]
x = list[2]
for i in range(a, b+1):
    if i%x == 0:
      cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
a,b,x=map(int,input().split())
if b == 0:
    print(1)
elif a == 0:
    print(b//x)+1
else:
    print(b//x-(a-1)//x)

Submission status: Runtime Error

Solution code:
a,b,x=map(int,input().split())
if a == 0:
    print(b//x)+1
else:
    print(b//x-(a-1)//x)

Submission status: Runtime Error

Solution code:
a,b,x=map(int,input().split())
print((b-a)//x) if (b%x != 0 and %x != 0) else print((b-a)//x+1)

Submission status: Runtime Error

Solution code:
9 9 2

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input())

ans = b//c - (a-1)//c
print(ans)

Submission status: Runtime Error

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A
"""
s = LS()[1]
print("A"+s[0]+"C")
"""
#B
a,b,x = LI()
print(x//b-x//(a-1))
#C
"""
n,x = LI()
a = LI()
ans = 0
for i in range(n-1):
    if a[i]+a[i+1] > x:
        ans += a[i+1]+a[i]-x
        if x > a[i]:
            a[i+1] = x-a[i]
        else:
            a[i+1] = 0
            a[i] = x
print(ans)
"""

#D
"""
s = S()
l = len(s)
k = (s[0] == s[-1])
if (l%2)^k:
    print("First")
else:
    print("Second")
"""
#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T

Submission status: Runtime Error

Solution code:
a,b,x = map(int,input().split())

def countAC(n):
    if n == -1:
        return 0
    else:
        return (n // x+1)


prin

Submission status: Runtime Error

Solution code:
a, b, x = map(int,input().split())
tmp = a
while True:
    if tmp % x == 0:
        break
    else:
        tmp += 1
print((b//tmp)-(a//tmp))

Submission status: Runtime Error

Solution code:
a,b,x = map(int, input().split())
if a!=0:
  c = int((a-1)/x)
  d = int(b/x)
if a!=0:
  print(d-c)
elif a==0:
  print(d)

Submission status: Runtime Error

Solution code:
a,b,x = map(int, input().split())
if a!=0:
c = int((a-1)/x)
d = int(b/x)
if a!=0:
  print(d-c)
elif a==0:
  print(d)

Submission status: Runtime Error

Solution code:
def f(n):
    return(int(n/x)+1 if n >=0 else 0)
    
a, b, x = list(map(int, input().split()))
print(max(f(b)-f(a-1)),0)

Submission status: Runtime Error

Solution code:
from statistics import mean, median,variance,stdev
import sys
import math
import fractions
def j(a):
    if a==1: print("YES")
    else :print("NO")


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())

#x = int(input())                              #入力整数1つ
#x,y = (int(i) for i in input().split())      #入力整数横2つ
x,y,z = (int(i) for i in input().split())    #入力整数横3つ
#a,b,c,k = (int(i) for i in input().split())  #入力整数横4つ
#a = [int(i) for i in input().split()]        #入力整数配列
#x = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
lower = (x//z)*z
if lower < x: lower+=z
high = (y//z)*z
print((high - low)/z+1)

Submission status: Runtime Error

Solution code:
a,b,x=map(int,input().split())
c=0
for i in range(a,b+1):
  if x%i==0:
    c+=1
print(a)

Submission status: Runtime Error

Solution code:
A,B,X = map(int,input().split())
mn = -(-A//X)
mx = B//X
if A == B :
    if A % X == 0:
        prnt(1)
    else:
        print(0)
else:
    print(mx - mn + 1)

Submission status: Runtime Error

Solution code:
        a = input().split()
        i = int(a[0])
        d = int(a[1])
        x = int(a[2])
        rd = d / x
        ri = (i - 1) / x
        if (ri < 0):
          ri = -1
        print(rd - ri)

Submission status: Runtime Error

Solution code:
    a = input()
    a.split()
    i = int(a[0])
    d = int(a[1])
    x = int(a[2])
    rd = d / x
    ri = (i - 1) / x
    if (ri < 0):
      ri = -1
    print(rd - ri)

Submission status: Runtime Error

Solution code:
a = input()
a.split()
i = (int)a[0]
d = (int)a[1]
x = (int)a[2]
rd = d / x
ri = (i - 1) / x
if (ri < 0):
  ri = -1
print(rd - ri)

Submission status: Runtime Error

Solution code:
s = input()
s = s.split(" ")
a = int(s[0])
b = int(s[1])
c = int(s[2])
res = b // x
res -= ((a - 1) // x)
print(res)

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())
b += x-1-(b % x)
if a % x:
    a += x-(a % x)
print(max(b-a+1, 0)

Submission status: Runtime Error

Solution code:
a,b,x = map(int,input().split)
if a>0:
  a-=1
else:
  b+=1
print(b//x - a//x)

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
modb = []
for n in range(a, b+1):
  if n % c = 0:
    modb.append(n)
print(len(modb))

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input())

count = 0
for i in range(a, b + 1):
  if i % x == 0:
    count += 1
    
print(count)

Submission status: Runtime Error

Solution code:
x,y,a=map(int,input().split())
s=0
for i in range[x:y]:
    if i%a==0:
        s+=1
print(s)

Submission status: Runtime Error

Solution code:
a,b,x=map(int,input().split())
B=b//x
A=a//x

print(B-A+not(a%x))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
a,b,x = map(int,input().split())
a = []
for i in range(a:b+1):
  if i % x == 0:
    a.append(1)
print(sum(a))

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())
#aからbまでをliに格納
li = list(range(a, b+1))
ans = 0

#liの要素数だけfor文を回す
for i in range(len(li)):
  #li[i]がxで割り切れる時
  if li[i] % x == 0:
    #ansに1を追加
    ans += 1
    
print(ans)

Submission status: Runtime Error

Solution code:
a, b, x = [int(x) for x in input().split()]
print(b // x - a // x + (a % x == 0))a,b,x=map(int,input().strip().split(" "))
count=0

count_a=a//x
count_b=b//x

if(a%x==0):
    count_a-=-1

count=count_b-count_a

print(count)

Submission status: Runtime Error

Solution code:
a,b,c = list(map(int,input().split()))
count = 0

for i in range(b-a+1)
if (a+i) % c == 0:
  count = count + 1

print(count)

Submission status: Runtime Error

Solution code:
a,b,x=map(int,input().split())
first=a-a%x+x
if(first==a+x):
  first=a
last=b-b%x

print(last//x - first//x +1

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>

using namespace std;

int main(){
    long long a,b,x;
    scanf("%lld %lld %lld",&a,&b,&x);
    printf("%lld\n",(b/x)-(a/x)+(a%x==0?1:0));
    return 0;
}

Submission status: Runtime Error

Solution code:
count = 0
a = min(m,n)
b = max(m,n)

if a/x == int(a//x) and b/x == int(b//x):
    print(int(1 + b//x - a//x))

elif a/x == int(a//x) and b/x != int(b//x):
    print(int(int(b//x) - int(a//x) + 1))

elif a/x != int(a//x) and b/x == int(b//x):
    print(int(int(b//x) - int(a//x)))

elif a/x != int(a//x) and b/x != int(b//x):
    print(int(int(b//x) - int(a//x)))

Submission status: Runtime Error

Solution code:
a,b,x = map(int,input().split())
c =0
for i in range(a,b+1):
	if i % x == 0:
        c +=1
print(c)

Submission status: Runtime Error

Solution code:
a,b,x = map(int,input().split())
c =0
for i in range(a,b+1):
	if i % x == 0:
        c +=1
print(c)

Submission status: Runtime Error

Solution code:
#1
x,y,z = map(int, input().split())
cnt = 0

for row in range(x,y+1)
    if row % z = 0 :
        cnt = cnt + 1

print(cnt)

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())
print(b//x - (a-1)//x

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())
print((b-a)//x+((a%x==0)or(b%x==0))

Submission status: Runtime Error

Solution code:
import re
s = input()
print("A%sC" % re.match('AtCoder (.).* Contest', s)[1])

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())

f=0

if b%c==0 and a%c==0:
    f+=1
if a==0 and b>0:
    f+=1

print(b//c-a//c+f)a,b,c=map(int,input().split())

f=0

if b%c==0 and a%c==0:
    f=1

print(b//c-a//c+f)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <map>
#include <limits>
using namespace std;
typedef long long ll;

float inf = std::numeric_limits<float>::infinity();

/* 二次元配列の宣言
  vector<vector<int>> tb;
  tb.resize(H);
  for (size_t i = 0; i < H; i++) {
    tb[i].resize(W);
  }
*/
/*
  A.resize(N);
  for (int i = 0; i < N; i++) {scanf("%d",&A[i]);}
*/

int main(void) {
  while (true) {
  ll a,b,x;
  cin >> a >> b >> x;
  cout << (b/x)-(a-1)/x << endl ;
  }

  return 0;
}

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())

def f(n, x):
    if n >= 0:
        return int(n/x) + 1
    else:
        return 0

print(f(b, x) - f(a, n))

Submission status: Runtime Error

Solution code:
import math
import numpy
a, b, x = map(uint64, input().split())

res = 0    
res += math.floor((b-a)/x)

if a%x == 0:
    res += 1

if b%x == 0:
    res += 1


print(res)

Submission status: Runtime Error

Solution code:
a , b , x= int(input()),int(input()),int(input())
print ((b - a)/x)

Submission status: Runtime Error

Solution code:
a, b, x = list(map(int, input().split()))

ans = 0
for i in range(a, b + 1):
	if i % x == 0:
    	ans += 1
        
print(ans)

Submission status: Runtime Error

Solution code:
a, b, x = map(init, input().split())
print(b//x-(a-1)//x)

Submission status: Runtime Error

Solution code:
1 1000000000000000000 3

Submission status: Runtime Error

Solution code:
a, b, x = [int(i) for i in input().split()]
for i in range(a, b+1):
    if i % x == 0:
        first_num = i
        break
print(-(-(b - first_num) // x))

Submission status: Runtime Error

Solution code:
a, b, x = map(int, raw_input().split())

i = a
count = 0
while i < b + 1:
    if x%i == 0:
        count = count + 1
    i = i + 1

print count

Submission status: Runtime Error

Solution code:
a, b, x = map(int, raw_input().split())

i = a
count = 0
while i < b + 1:
    if x%i == 0:
        count = count + 1

print count

Submission status: Runtime Error

Solution code:
a, b, x = map(int, raw_input().split())

i = a
count = 0
for i in i < b + 1:
    if x%i == 0:
        count = count + 1

print count

Submission status: Runtime Error

Solution code:
a, b, x = map(int, raw_input().split())

i = a
count = 0
for i in i < b + 1:
    if x%i == 0:
        count++

print count

Submission status: Runtime Error

Solution code:
print('A' + input()[8] + 'C')

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())


def f(n):
    if n >= 0:
        return n//x+1
    else:
        0

print(f(b)-f(a-1))

Submission status: Runtime Error

Solution code:
a, b, x = [int(n) for n in input().split()]

res = 0
for n in range(a, b + 1)
    if n % x == 0:
        res += 1
print(res)

Submission status: Runtime Error

Solution code:
ABC048B

a,b,x=map(int,raw_input().split())
res=b/x
if a!=0:
 res-=(a-1)/x
else:
 res+=1
print res

Submission status: Runtime Error

Solution code:
a, b, x= raw_input().split()
if a%3 == 0:
    print b//x - a//x +1
else:
   print  b//x - a//x +1

Submission status: Runtime Error

Solution code:

a, b, x = map(int,raw_input().split())
cnt = 0

for i in range(a,b):
    if i % x = 0:
        cnt = cnt + 1

print int(cnt)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

a, b, x = map(int,raw_input().split())
cnt = 0

for i in range(a,b):
    if i % x = 0:
        cnt = cnt + 1

print cnt

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

a, b, x = map(int,raw_input().split())
cnt = 0

for i in range(a,b):
    if i % x = 0:
        cnt = cnt + 1

Submission status: Runtime Error

Solution code:
a, b, x= raw_input().split()
m = (b-a)//x
if a%x == 0 or b%x == 0:
    print m+1
else:
    print m

Submission status: Runtime Error

Solution code:
a, b, x= raw_input().split()
m = a//b
if a%x == 0 or b%x == 0:
    print m+1
else:
    print m

Submission status: Runtime Error

Solution code:
n=input().split(" ")
a=int(n[0])
b=int(n[1])
x=int(n[2])

if a%x!=0:
    a+=x-(a%x)
b=b-(b%x)

if b<a:
    print(0)
else:
    print(long(((b-a)/x)+1))

Submission status: Runtime Error

Solution code:
a,b,c = map(int,raw_input().split())
i = 0
for n in range(a , b + 1):
    if n % c == 0:
        i = i + 1
    
print i

Submission status: Runtime Error

Solution code:
#coding: UTF-8

import math


if __name__ == "__main__":
	a = int(input())
	b = int(input())
	x = int(input())
	if a%x == 0:
		print((b-a)//x+1)
	else:
		print((b-a)//x)

Submission status: Runtime Error

Solution code:
from decimal import Decimal
round=lambda x:(x*2+1)//2
a,b,c=[int(i) for i in input().split()]
num1=round(Decimal(b)/Decimal(c))
if(a%c==0):
    num2=round(a/c)-1
else:
    num2=round(a/c)

print(num1-num2)

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())

def count(num1, num2):
  return num1 // num2

c = count(b, x)
d = count(a-1)

ans = c-d
print(ans)

Submission status: Runtime Error

Solution code:
import math as math
 
nums = list(map(int, input().split()))
 
a = int(nums[0])
b = int(nums[1])
x = int(nums[2])
 
x1 = (a-1) // x
x2 = b // x
 
ans = x2 - x1
print(ans)

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())
c = b // x
d = (a-1) // x

if a == 0 and b == 0:
    print(1)
    exit(1)

elif a == 0 or b == 0:
    print(c + 1)
    exit(1)

print(c - d)

Submission status: Runtime Error

Solution code:
#include <stdio.h>

int main(void)
{
  long long int a, b, x;
  long long int i, cnt = 0;
  scanf("%lld %lld %lld", &a, &b, &x);
  
  if (a == 1) cnt = b / x;
  else for (i = a; i <= b; i++) if (i % x == 0) cnt++;
  printf("%lld\n", cnt);

  return (0);
}

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())
cnt = 0
if b > 10 ** 9:
        cnt = (b-a) / c
        print (cnt)
else:
    for i in range(a,b+1):
        if i % c == 0:
            cnt += 1
    print (cnt)

Submission status: Runtime Error

Solution code:
a,b,x = map(int, raw_input().split());
cnt = 0;
for i in range(a,b+1):
    if(i%x == 0):
        cnt+=1;
print(cnt);

Submission status: Runtime Error

Solution code:
a, b, x = [int(i) for i in raw_input().split()]
c = 0
for i in range(a, b + 1):
    if i % x == 0:
        c += 1
print(c)

Submission status: Runtime Error

Solution code:
a, b, x = map(int, raw_input().split())
ans = 0
for i in range(a, b+1):
    if i % x == 0:
        ans += 1
print ans