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: Wrong Answer

Solution code:
#coding: UTF-8

import math


if __name__ == "__main__":
	data = list(map(int,input().split()))
	if data[0]%data[2] == 0:
		print((data[1]-data[0])//data[2]+1)
	else:
		if data[2] > data[1]:
			print("0")
		else: 
			print((data[1]-data[2])//data[2]+1)

Submission status: Wrong Answer

Solution code:
#coding: UTF-8

import math


if __name__ == "__main__":
	data = list(map(int,input().split()))
	if data[0]%data[2] == 0:
		print((data[1]-data[0])//data[2]+1)
	else:
		print((data[1]-data[0])//data[2])

Submission status: Wrong Answer

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

cnt = b//x - a//x
if (a%x == 0) and (a < b):
	cnt += 1
print(cnt)

Submission status: Wrong Answer

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

B=(b//x)*x
if B>A:
    print((B-A)//x+1)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from decimal import Decimal
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: Wrong Answer

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

print(num1-num2)

Submission status: Wrong Answer

Solution code:
import sys
A,B,D = map(int, raw_input().split())

num1=A/D
num2=(B-1)/D

print num1-num2

Submission status: Wrong Answer

Solution code:
a,b,x=[int(i) for i in input().split()]
if (a % x != 0):
    a = x * (a/x+1)
if (b % x != 0):
    b = x * (b / x + 1)

print ((b- a) / x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

    if i > a + x:
        break

if start == -1:
    print(0)
    exit(1)

for i in range(b, int(b / x) * x - 1, -1):
    if i % x == 0:
        end = i
        break

print(int(((end / x - start / x)) + 1))

Submission status: Wrong Answer

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

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

    if i > a + x:
        break

if start == -1:
    print(0)
    exit(1)

for i in range(b, int(b / x) * x - 1, -1):
    if i % x == 0:
        end = i
        break

print(((end / x - start / x)) + 1)

Submission status: Wrong Answer

Solution code:
import numpy as np
a, b, x = np.array(list(input().split()), dtype=np.uint64)
print(b // x - a // x + (b % x == 0))

Submission status: Wrong Answer

Solution code:
a, b, x = list(map(int, input().split()))
print(sum([c%x for c in range(a,b+1)]))

Submission status: Wrong Answer

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


ans = (b - a + 1) // x

if a % x == 0 and b % x == 0 and x > 1:
    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
A,B,D = map(int, raw_input().split())

while A%D!=0:
 A=A+1
num=A/D
while A<=B:
 print "{} ".format(num),
 num=num+1
 A=A+D

Submission status: Wrong Answer

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

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

    if i > a + x:
        break

if start == -1:
    print(0)
    exit(1)

for i in range(b, int(b / x) * x, -1):
    if i % x == 0:
        end = i
        break

print(((end / x - start / x)) + 1)

Submission status: Wrong Answer

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


ans = (b - a) // x

if a % x == 0 and b % x == 0:
    ans += 1

print(ans)

Submission status: Wrong Answer

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


ans = b // x - a // x

if a % x == 0 and b % x == 0:
    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
count = 0
if b > 100:
  temp = float(b) / 100
  print(temp)

  for i in range(a, 100):
    if i % c == 0:
      count+=1
  ans = float(count) * temp
  print(ans)
else:
  for i in range(a, b+1, c):
    if i % c == 0:
      count+=1
  print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

Solution code:
import math

a, b, x = map(int, input().split())
if a%x != 0:
    min_n = int(a/x)
else:
    min_n = int(a/x)-1
max_n = int(b/x)
print(max_n-min_n)

Submission status: Wrong Answer

Solution code:
import math

a, b, x = map(int, input().split())
if a%x != 0:
    min_n = int(a/x)
else:
    min_n = int(a/x)-1
max_n = (b/x)
print(max_n-min_n)

Submission status: Wrong Answer

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

total=(b-a+1)//x

print(total)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力

a, b, x = map(long, raw_input().split())

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

Submission status: Wrong Answer

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

total=(b-a)//x
if a%x==0:
    total+=1
print(total)

Submission status: Wrong Answer

Solution code:
a,b,x=map(long,raw_input().split())
c=int(a/x)
d=float(a)/x
if(c!=d):
    c=c+1
e=int(b/x)
print e-c+1

Submission status: Wrong Answer

Solution code:
i = [int(x) for x in input().split()]
c = 0
if i[0] % i[2] == 0 or i[1]%i[2] == 0:
    c = 1
if i[0] >= i[2]:
    c += int((i[1]-i[0])//i[2])
if i[0] < i[2]:
    c += int(i[1]//i[2])
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,x=map(float,raw_input().split())
c=int(a/x)
d=float(a)/x
if(c!=d):
    c=c+1
e=int(b/x)
print e-c+1

Submission status: Wrong Answer

Solution code:
a,b,c=[int(i) for i in input().split()]
num1=int(b/c)
if(a%c==0):
    num2=int(a/c)-1
else:
    num2=int(a/c)
print(num1-num2)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python

import sys

def main(argv):
    for line in sys.stdin:
        a, b, x = line.rstrip("\n").split(" ", 3)
        a = int(a)
        b = int(b)
        x = int(x)

        start_index, start_reminder = divmod(a, x)
        end_index, end_reminder = divmod(b, x)

        result = end_index - start_index
        if start_reminder == 0 or end_reminder == 0:
            result += 1
        print result

if __name__ == "__main__":
    main(sys.argv)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
i = [int(x) for x in input().split()]
c = 0
if i[0] % i[2] == 0 and i[1]%i[2] == 0:
    c = 1
if i[0] == i[1] and i[1]%i[2] == 0:
    c = 1


c += int((i[1]-i[0])/i[2])



print(c)

Submission status: Wrong Answer

Solution code:
a,b,x=map(int,raw_input().split())
c=int(a/x)
d=float(a)/x
if(c!=d):
    c=c+1
e=int(b/x)
print e-c+1

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,x=map(int,raw_input().split())
c=b-a+1
d=int(c/x)
e=float(c)/x
if(e==d):
    print d
else:
    print d+1

Submission status: Wrong Answer

Solution code:
i = [int(x) for x in input().split()]
if i[0]%i[2] == 0 and i[1]%i[2] == 0:
    c = 1
else:
    c = 0
c += int((i[1]-i[0])/i[2])

print(c)

Submission status: Wrong Answer

Solution code:
import math
st = input().split()
a = int(st[0])
b = int(st[1])
x = int(st[2])

ret = b//x -  math.floor((a-0.1)/x)

print(ret)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python

import sys

def main(argv):
    for line in sys.stdin:
        result = 0
        a, b, x = line.rstrip("\n").split(" ", 3)
        a = int(a)
        b = int(b)
        x = int(x)
        start, reminder = divmod(a, x)
        end, reminder = divmod(b, x)
        result = end - start
        if end > 0 and reminder == 0:
            result += 1
        print result

if __name__ == "__main__":
    main(sys.argv)

Submission status: Wrong Answer

Solution code:
import sys
A,B,D = map(int, raw_input().split())

while A<=B:
 if A%D==0:
  num=A/D
  print "{} ".format(num),
  A=A+D
 else:
  A=A+1

Submission status: Wrong Answer

Solution code:
import sys
A,B,D = map(int, raw_input().split())

while A<=B:
 if A%D==0:
  num=A/D
  print "{} ".format(num),
  A=A+D

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def max_times(num, mod):
	if num < mod:
		return 0
	else:
		return num//mod

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

cnt = max_times(b,x) - max_times(a,x)
if (a%x == 0) and (a < b):
	cnt += 1
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python

import sys

def main(argv):
    for line in sys.stdin:
        result = 0
        a, b, x = line.rstrip("\n").split(" ", 3)
        a = int(a)
        b = int(b)
        x = int(x)
        start, reminder = divmod(a, x)
        end, reminder = divmod(b, x)
        result = end - start
        if reminder == 0:
            result += 1
        print result

if __name__ == "__main__":
    main(sys.argv)

Submission status: Wrong Answer

Solution code:
import sys
A,B,D = map(int, raw_input().split())

while A<=B:
 if A%D==0:
  num=A/D
  print "{} ".format(num),
 A=A+1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

if a == 0:
    ans += 1

r = b // x
l = a // x

ans += r - l

print(ans)

Submission status: Time Limit Exceeded

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

p = (b-a+1)//x
N = a+p*x

while N <= b:
  if N%x == 0:
    p += 1
    break
  else:
    N += 1

print(p)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

print(0)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#coding: utf-8

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
a, b, x = [int(x) for x in input().split()]
ans = 0
while True:
    if a > b:
        break
    else:
        if a % x ==0:
            ans += 1
        a += 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
a, b, x = [int(x) for x in input().split()]
ans = 0
while True:
    if a > b:
        break
    else:
        if a % x ==0:
            ans += 1
            a += 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
from sys import stdin, stdout
from time import perf_counter

import sys
sys.setrecursionlimit(10**9)
mod = 10**9+7

# import sys
# sys.stdout = open("e:/python/cp/output.txt","w")
# sys.stdin = open("e:/python/cp/input.txt","r")



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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(count)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

def main():

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

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def abc0482():
    a=[]
    x=input()



    
    z=x.split()
    for y in z:
      a.append(int(y))
    b=a[0]
    c=a[1]
    d=a[2]
    ds=[i/d for i in range(b,c+1)  if i%d==0]
    print(len(ds))
        



abc0482()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
s = input().split()

a = int(s[0])
b = int(s[1])
x = int(s[2])

count = 0

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

print(count)

Submission status: Time Limit Exceeded

Solution code:
l = list(map(int,input().split()))
a = l[0]
b = l[1]
x = l[2]
if a%x != 0:
	a = a+x-(a%x)
r =[i for i in range(a,b+1,x)]
print(len(r))

Submission status: Time Limit Exceeded

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

print(count)

Submission status: Time Limit Exceeded

Solution code:
a, b, x = map(int, input().split())
baisu = x
count = 0
while baisu <= b:
    if baisu >= a:
        count += 1
    baisu += x

if a == 0:
    count += 1

print(count)

Submission status: Time Limit Exceeded

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

b -= b % x

while b >= a:
    b -= x
    k += 1

print(k)

Submission status: Time Limit Exceeded

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

for i in range(b+1):
    if i%x == 0:
        count_b+=1

print(count_b-count_a)

Submission status: Time Limit Exceeded

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

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

print(t)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print((b-s)//x+t)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
a,b,x=map(int, input().split())
n=x*((a+x-1)//x)
cnt=0
while n<=b:
  cnt+=1
  n+=x
print(cnt)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

print(solve())

Submission status: Time Limit Exceeded

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

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

print(k)

Submission status: Time Limit Exceeded

Solution code:
A = list(map(int,input().split()))
cnt = 0
for i in range(A[0],A[1]+1):
    if i % A[2] == 0:
        cnt += 1
print(cnt)

Submission status: Time Limit Exceeded

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

ans = 0

for i in range(0, b//x+1):
    xi = x * i
    if xi >= a and xi <= b:
        # print(xi)
        ans += 1
    if xi > b:
        break

print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

count = 0

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

print(count)

Submission status: Time Limit Exceeded

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: Time Limit Exceeded

Solution code:
start, end, div = input().strip().split()

count = 0
for i in range(int(start),int(end)+1):
  if i % int(div) == 0:
    count += 1
print(count)

Submission status: Time Limit Exceeded

Solution code:
a,b,x = map(int,input().split())
l=[a]
for i in range(a, b):
    while a<b:
        a+=1
        l.append(a)
        
print([i % x for i in l].count(0))

Submission status: Time Limit Exceeded

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

# a,b,x = map(int, "0 5 1".split())
cnt=0
for num in range(a, b+1, 1):

    if num % x == 0:
        cnt+=1
print(cnt)

Submission status: Time Limit Exceeded

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

cnt=0
for num in range(a, b+1, 1):

    if num % x == 0:
        cnt+=1
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
def main():
  num = list(map(int,input().split()))
  count=0
  for i in range(num[0],num[1]+1):
    if i%num[2]==0 :
      count+=1
  print(count)
  
main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

count = 0
first = 0
for i in range(a, b+1):
#    print(i)
    if i%x == 0:
        first = i
        count = 1
        break
    
if count != 0:
    result  = (b-first) // x +1

else :
    result = 0


print(result)

Submission status: Time Limit Exceeded

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

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


 #  print('--------')
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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: Time Limit Exceeded

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: Time Limit Exceeded

Solution code:
# 非負の整数a, b(a ≤ b)と 、 正の整数xが与えられます 。
# a以上b以下の整数のうち 、 xで割り切れるものの個数を求めてください 。
a, b, x = [int(i) for i in input().split()]

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

print(cou)

Submission status: Time Limit Exceeded

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

print(flag)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
a,b,x=map(int,input().split())
l=[]
ans=0
for i in range(a,b+1):
  l.append(i)
for j in range(len(l)):
  if l[j]%x==0:
    ans+=1
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
a,b,x = map(int,input().split())
Rb = range(0,b+1,x)
Mb = max(Rb)//x + 1

if not a == 0:
    Ra = range(0,a,x)
    Ma = max(Ra)//x + 1

    print(Mb - Ma)

if a == 0:
    print(Mb)

Submission status: Time Limit Exceeded

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: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
x = [int(e) for e in input().split()]
a = x[0]
b = x[1]
c = x[2]
ans = 0
for i in range(a,b+1):
    if(c !=0)and(i%c)==0:
        ans+=1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
input_data = list(map(int,input().split()))
nums = [input_data[0],input_data[1]]
x = input_data[2]
cnt = 0
for i in range(nums[0],nums[1]+1):
    if i % x == 0:
        cnt += 1

print(cnt)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""

# Written by NoKnowledgeGG @YlePhan

#import math
#mod = 10**9+7

def main():
  a,b,x = map(int,input().split())
  cnt = 0
  for l in range(a,b+1):
    if l % x == 0:
      cnt += 1
  print(cnt)
if __name__ == '__main__':
  main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

j = 0

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

print(j)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
x = list(map(int,input().split()))
a = 0
b = x[1]+1
for i in range(x[0],x[1]+1):
    if i % x[2] ==0:
        a = 1
        b=i+x[2]
        break
while x[1]>=b:   
    b += x[2]
    a=a+1
print(a)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(cnt)

Submission status: Time Limit Exceeded

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

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

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

if minimum != None or maximum != None:
    if minimum != None and maximum != None:
        # 普通の / 除算だと3で割ったときに大きくずれる。
        total = (maximum - minimum) // x + 1
    else:
        total = 1
else:
    total = 0

print(total)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
a, b, x = map(int, input().split())
num_list = [i for i in range(a, b + 1)]
count = len(list(filter(lambda t: t % x == 0, num_list)))
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(counter)

Submission status: Time Limit Exceeded

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)