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

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

print(len(ls))

Submission status: Time Limit Exceeded

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

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())
ansA=0
ansB=0
for i in range(a):
    if (a!=0 and i%x==0):
        ansA+=1

for j in range(b+1):
    if (j%x==0):
        ansB+=1

print(ansB-ansA)

Submission status: Time Limit Exceeded

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

for j in range(b+1):
    if (j%x==0):
        ansB+=1
print(ansB-ansA)

Submission status: Time Limit Exceeded

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

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())
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())
count = 0
for i in range(a,b+1):
    if i%x == 0:
        count += 1
print(count)

Submission status: Time Limit Exceeded

Solution code:
list = input().split()
cnt = 0
a = int(list[0])
b = int(list[1])
x = int(list[2])
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:
# -*- coding: utf-8 -*-
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:
import sys
input = sys.stdin.readline

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:


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

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

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())
key = 0
count = 0

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

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

Submission status: Time Limit Exceeded

Solution code:
a, b, x = map(int, input().split())
key = 0
count = 0
if a == b:
    if a % x == 0:
        print(1)
        exit()
    else:
        print(0)
        exit()

for i in range(a, b + 1, 1):
    if i % x == 0:
        key = i
        count += 1
        break
ans = count + (b - key) // x
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
        
print(count)

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,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
print(count)

Submission status: Time Limit Exceeded

Solution code:
A, B, C = list(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:
# coding: utf-8

A,B,X = map(int, input().split())

is_disivle = 0

for i in range(A,B+1):
    if(i%X == 0):
        is_disivle += 1

print(is_disivle)

Submission status: Time Limit Exceeded

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

print(0)

Submission status: Time Limit Exceeded

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

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

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
    else:
        pass
print(ans)

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
    else:
        ans+=0
print(ans)

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
    else:
        ans=ans

print(ans)

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() )

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())
cnt = 0
for num in range(a, b+1):
    if num % x == 0:
        cnt += 1
print(cnt)

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,n = map(int,input().split())

cou = 0

for i in range(a,b+1):
    if i % n == 0:
        cou += 1
    else:
        pass
      
print(cou)

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:
import numpy as np
from sys import stdin
a, b, x = [int(x) for x in stdin.readline().rstrip().split()]
print(len(np.array([num for num in range(a, b+1) if num % x == 0], dtype=np.float32)))

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
a, b, x = map(int, input().split())
count = np.array([num for num in range(a, b+1) if num % x == 0], dtype=np.float32)
print(len(count))

Submission status: Time Limit Exceeded

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

print(len(count))

Submission status: Time Limit Exceeded

Solution code:
a, b, x = map(int, input().split())
count = 0
for num in range(a, b+1):
    if num % 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 = 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()))

result = [i % x for i in range(a, b + 1)].count(0)
print(result)

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 = map(int, input().split())
num_list = [i for i in range(a, b + 1) if i % x == 0]
print(len(num_list))

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())
tmp = a
while True:
    if tmp % x == 0:
        break
    else:
        tmp += 1
li = [i for i in range(tmp,b+1,x)]
print(len(li))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

while(sum<=b):
    if(a<=sum):
        count += 1
    sum += x
        
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,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())
ls=[i for i in range(0,b+1,x) if i>=a]
print(len(ls))

Submission status: Time Limit Exceeded

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

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())
s=0
for i in range(a,b+1):
    if (i%x==0):
        s+=1
print(s)

Submission status: Time Limit Exceeded

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

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())
c=0
def fun():
     print('1')
     print('2')
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
def fun():
     print('1')
     print('2')
     print('3')
     print('4')
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
def fun():
     print('1')
     print('2')
     print('3')
     print('4')
     print('5')
     print('6')
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())
ans=0
for s in range(a,b+1):
  if s%x==0:
    ans+=1
    break
ans+=(b-s)//x
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
print(count)

Submission status: Time Limit Exceeded

Solution code:
import sys
# A,B,C = [int(n) for n in input().split()]
# N = int(input())
# A = [0]*N
# for i in range(N):
#     A[i] = int(input())
# S = str(input())
# T = str(input())

a,b,x = [int(n) for n in 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

print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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: 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:
x,y,a=map(int,input().split())
s=0
for i in range(x,y+1):
    if i%a==0:
        s+=1
print(s)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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


def max_search(s, t):
    for i in range(s):
        if (s-i) % t == 0:
            return (s-i) // t
    return 0

a_max = max_search(a-1, x)
b_max = max_search(b, x)
if a == 0:
    b_max += 1
print(b_max-a_max)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(c)

Submission status: Time Limit Exceeded

Solution code:
a, b, x = [int(i) for i in input().split()]
c = 0
d = 0
while c <= b:
    if a <= c:
        d += 1
    c += x
print(d)

Submission status: Time Limit Exceeded

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

print(ans)

Submission status: Time Limit Exceeded

Solution code:
a,b,x=map(int,input().strip().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:
# input
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:
# coding: utf-8
a, b, x = map(int, input().split())
cnt = 0
n = b - a + 1
for i in range(n):
    if (a+i)%x==0:
        cnt += 1
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
def abc048_b():
    a_min, b_max, x_cin = map(int, input().split())
    ans = 0
    for i in range(a_min, b_max+1):
        if i % x_cin == 0:
            ans += 1

    return ans


if __name__ == '__main__':
    print(abc048_b())

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
S=input()
T=S.split(" ")
a=int(T[0])
b=int(T[1])
x=int(T[2])
U=[i for i in range(a,b+1) if i%x==0]
print(len(U))

Submission status: Time Limit Exceeded

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: 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:
## ABC 048 b
a,b,x = (int(_) for _ in 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())
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 = [int(s) for s in input().rstrip().split()]
for i in range(a, a+x):
    if i % x == 0:
        min = i
        break
for i in range(b, b-x, -1):
    if i % x == 0:
        max = i
        break
print((max - min) // x + 1)

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:
from sys import stdin
il = lambda func=int: list(map(func, stdin.readline().rstrip().split()))
ils = lambda n, s="int(input())": [eval(s) for _ in range(n)]

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

Submission status: Time Limit Exceeded

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

print(len([None for i in range(a, b+1) if not i%x]))

Submission status: Time Limit Exceeded

Solution code:
def main():
    a, b, x = map(int, input().split())
    li = filter(lambda y: y % x == 0, range(a, b + 1))
    print(len(list(li)))


if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
a = list(map(int,input().split(" ")))
count = 0
for i in range(a[0],a[1]+1):
    if i % a[2] == 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:
#! /usr/bin/python3
# Between a and b ...

"""
非負の整数 a, b (a≤b) と、正の整数 x が与えられます。
a 以上 b 以下の整数のうち、x で割り切れるものの個数を求めてください。
"""

test_mode = False

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

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

print(counter)

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())
i = 0
for j in range(a,b+1):
    if j%x==0:
        i+=1
print(i)

Submission status: Time Limit Exceeded

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

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 = ans + 1


print(ans)

Submission status: Time Limit Exceeded

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

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())
answer = 0
flag = 0
for i in range(a,b+1) :
    if i % x == 0 :
        answer += 1
        p = i
        flag += 1
        break
if flag == 1 :
    q = b-p
else :
    q = b-a
answer += q//x
print(answer)

Submission status: Time Limit Exceeded

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

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 += ((b - i) // x + 1)
        break


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 = 0
for a in range(A,B+1):
    if a%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:
x,y,z = map(int, input().split())
vl = []
for i in range(x, y+1):
    if i%z == 0:
        vl.append(i)
length = len(vl)

if length>0:
    print(length)
else:
    print(0)

Submission status: Time Limit Exceeded

Solution code:
#1
x,y,z = map(int,input().split())
cnt = 0
for i in range(x,y+1):
    if i % z ==0:
        cnt = cnt+1
    else:
        continue
print(cnt)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#1
k = 0
x, y, z = map(int, input().split())
for a in range(x, y+1):
    if a % z == 0 : 
        k = k + 1
print(k)

Submission status: Time Limit Exceeded

Solution code:
x,y,z = map(int, input().split())

count = 0

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#1
x,y,z = map(int,input().split())
p=0
for i in range(x,y+1):
    if i%z==0: p+=1
print(p)

Submission status: Time Limit Exceeded

Solution code:
#1

x, y, z = map(int, input().split())
count = 0

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

print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(count)

Submission status: Time Limit Exceeded

Solution code:
#1

x,y,z = map(int,input().split(' '))
cnt = 0
for i in range(x,y+1,1):
    if i % z == 0:
        cnt += 1
print(cnt)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#1

x,y,z = map(int, input().split())
a=0

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

print(a)

Submission status: Time Limit Exceeded

Solution code:
#1
x, y, z = map(int, input().split())
cnt = 0
s = x
while (s <= y):
    if s % z == 0 :
        cnt = cnt + 1
    s = s + 1
print (cnt)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

for cnt in range(a, a + x):
    if cnt % x == 0 :
        s = cnt
    else:
        continue
        
t = 0
        
for count in range(s, b + 1, x):
    if count % x == 0:
        t += 1
    else:
        continue
        
print(t)

Submission status: Time Limit Exceeded

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

s = 0

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#48b
a,b,x = map(int,input().split())
ans = 0
for _ in range(b-a+1):
    if a%x ==0:
        ans+=1
        a+=1
    else:
        a+=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())
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())
num = 0
for t in range(a, b + 1):
    if t % x == 0:
        num += 1
print(num)

Submission status: Time Limit Exceeded

Solution code:
a, b, x = list(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,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())
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=(int(i) for i in input().split())
c=0#count the devider
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 = (int(i) for i in input().split())

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

print(count)

Submission status: Time Limit Exceeded

Solution code:
count = 0
a,b,x = map(int,input().split(' '))
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 = map(int,input().split())
counter = 0

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

Submission status: Time Limit Exceeded

Solution code:
a,b,c = list(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:
import math
import sys

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

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


#print(a, b, x)

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(i) for i in input().split()]
first_num = 0
for i in range(a, b+1):
    if i % x == 0:
        first_num = i
        print((b - first_num) // x + 1)
        break
    elif first_num == 0 and i == b:
        print(0)

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())
sum=0
for i in range(a,b+1):
    if i%x==0:
        sum+=1
print(sum)

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())
array=[]
for i in range(a,b+1):
    if i%x==0:
        array.append(i)
print(len(array))

Submission status: Time Limit Exceeded

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

lis = []

Ans = 0

for i in range(b - a + 1):
	lis.append(b)
	b -= 1

for i in range(len(lis)):
	if lis[i] % x == 0:
		Ans += 1

print(Ans)

Submission status: Time Limit Exceeded

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

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
s = input()
a, b, x = map(int, s.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, raw_input().split())

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

print count

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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=[int(x) for x in input().split()]
ans=0
for i in range(a,b+1):
    if i%x==0:
        ans+=1
print(ans)