Problem:


Score : 100 points

Problem Statement

How many multiples of d are there among the integers between L and R (inclusive)?

Constraints

All values in input are integers.

1 \leq L \leq R \leq 100

1 \leq d \leq 100

Input

Input is given from Standard Input in the following format:

L R d

Output

Print the number of multiples of d among the integers between L and R (inclusive).

Sample Input 1

5 10 2

Sample Output 1

3

Among the integers between 5 and 10, there are three multiples of 2: 6, 8, and 10.

Sample Input 2

6 20 7

Sample Output 2

2

Among the integers between 6 and 20, there are two multiples of 7: 7 and 14.

Sample Input 3

1 100 1

Sample Output 3

100



Sample input:
5 10 2


Sample output:
3

Submission status: Accepted

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

L, R, d = MI()

cnt = 0

for i in range(L,R+1):
    if i % d == 0:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
l, r, D = input().split()
L=int(l)
R=int(r)
d=int(D)
s=0
for i in range(L,R+1):
    if i%d==0:
        s=s+1
print(s)

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())
 
count = 0
for i in range(L, R+1):
    if i % d == 0:
        count+=1
 
print(count)

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())

count = 0
for i in range(L, R+1):
    if i % d == 0:
        count+=1

print(count)

Submission status: Accepted

Solution code:
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: Accepted

Solution code:
L,R,d=map(int,input().split())

print(R//d-(L-1)//d)

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())
print(R//d-(L-1)//d)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())

cnt = 0
for i in range(l, r+1):
    if i % d == 0:
       cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())

if (l/d).is_integer(): 
    print(r//d-l//d+1)
else:
    print(r//d-l//d)

Submission status: Accepted

Solution code:
l, r, d, = map(int, input().split())
multiples = r//d - (l-1)//d
print(multiples)

Submission status: Accepted

Solution code:
L,R,D = map(int, input().split())
cnt = 0
for i in range(L,R+1):
  if i%D == 0:
    cnt += 1
    
print(cnt)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split(' '))

count = 0

while(l <= r):
    
    if(l % d == 0):
        count += 1
    
    l += 1

print(count)

Submission status: Accepted

Solution code:
import math
import sys
readline = sys.stdin.readline


def main():
    l, r, d = map(int, readline().rstrip().split())
    print(math.floor(r/d) - math.ceil(l/d) + 1)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
(L,R,d) = map(int, input().split())
out=int(R/d)-int(L/d)+1
if ( L%d == 0):
  print (out)
else:
  print(out-1)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())
print(r//d-l//d+int(l%d==0 and r%d==0))

Submission status: Accepted

Solution code:
l,r,d=list(map(int, input().split()))
print(r//d-(l-1)//d)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())
myans = 0
for n in range(L,R+1):
    if n%d == 0:
        myans += 1
print(myans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log,gcd
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
'''
#Pythonを用いる場合
#numpy 1.18.0, scipy 1.4.1, scikit-learn 0.22, numba 0.47.0, networkx 2.4
 
import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix
'''
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

l,r,d=mii()
ans=0
for i in range(l,r+1):
    if i%d==0:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())
ans = 0
for i in range(L, R+1):
  if i%d == 0:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
L, R, d = map(int,input().split())

ans = []

for i in range(L, R + 1):
  if i % d == 0:
    ans.append(i)

print(len(ans))

Submission status: Accepted

Solution code:
m,n,d=map(int,input().split())
c=0
for i in range(m,n+1):

	if i%d==0:
		c+=1
		
print(c)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())
answer = 0
for i in range(l, r + 1):
    if i % d == 0:
        answer += 1
print(answer)

Submission status: Accepted

Solution code:
l,r,d=map(int,input().split())
cnt=0
for i in range(l,r+1):
    if i%d==0:
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
l,r,d=map(int, input().split())

cnt = 0
tmp = 0

while tmp <= r:
    tmp = tmp + d
    if tmp >= l and tmp <= r:
        cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
l,r,d=map(int,input().split())
cnt=0

for i in range(l,r+1):
    if i%d==0:
        cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())

cnt = 0
tmp = d
while tmp <= r:
    if tmp <= r and tmp >= l:
        cnt += 1
    tmp += d
print(cnt)

Submission status: Accepted

Solution code:
def solve(L,R,d):
    count = 0
    for i in range(L,R+1):
        if i % d == 0:
            count += 1
    return count
L, R, d = map(int, input().split())
print(solve(L,R,d))

Submission status: Accepted

Solution code:
stir=input()
lst=stir.split(" ")
l=int(lst[0])
r=int(lst[1])
t=lst[2]
b=1
x=0
multiples=[]
while(b<101):
    multiples.append(int(t)*b)
    b+=1
for a in range(l, r+1):
    for m in multiples:
        if(m==a):
            x+=1
print(x)

Submission status: Accepted

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: Accepted

Solution code:
L,R,d = map(int,input().split())

print(R//d - (L-1)//d)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
din = map(int, raw_input().split())
print ((din[1])/din[2] - (din[0]-1)/din[2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import deque
import math

def Next(): return input()
def NextInt(): return int(Next())
def NextInts(): return map(int,input().split())
def Nexts(): return map(str,input().split())
def NextIntList(): return list(map(int,input().split()))
def RowInts(n): return [input() for i in range(n)]

l,r,d = NextInts()

ans = 0
for i in range(l,r+1):
    if i%d == 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
def get_ints():
	return map(int, input().split())
def get_list():
	return list(map(int, input().split()))

l, r, d = get_ints()
c = 0
for i in range(l, r + 1):
	if i % d == 0:
		c += 1
print(c)

Submission status: Accepted

Solution code:
L,R,d=map(int,input().split())
a=L//d
if L%d==0:
    a-=1
b=R//d
print(b-a)

Submission status: Accepted

Solution code:
li = list(map(int, input().split()))
result = int(li[1]/li[2]) - int(li[0]/li[2])
if li[0] % li[2] == 0:
    result += 1
print(result)

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split(" "))

a = R // d
b = (L-1) // d
print(a-b)

Submission status: Accepted

Solution code:
read = lambda: list(map(int, input().split()))
l, r, d = read()
ans = 0
for i in range(l, r + 1):
    if i % d == 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())
ans = 0
for i in range(l, r + 1):
	if i % d == 0:
		ans += 1
print(ans)

Submission status: Accepted

Solution code:
L,R,d=map(int,input().split())

count=0
for i in range(L,R+1):
    if i%d==0:
        count+=1
print(count)

Submission status: Accepted

Solution code:
# Problem A - Number of Multiples

# input
L, R, d = map(int, input().split())

# initialization
count = 0

# count
for i in range(L, R+1):
    if i%d==0:
        count += 1

# output
print(count)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())

count = 0
for i in range(l, r + 1):
  if i % d == 0:
    count += 1
print(count)

Submission status: Accepted

Solution code:
l, r, d = map(int,input().rstrip("\n").split(" "))
 
answer = (r // d) - ((l-1) // d)
 
print(answer)

Submission status: Accepted

Solution code:
m,n,p = map(int, input().split())
l=[]
for i in range(m,n+1):
    if i % p == 0:
        l.append(i)
print(len(l))

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
num_list = []
for i in range(A,B+1):
  if i % C == 0:
    num_list.append(i)

print(len(num_list))

Submission status: Accepted

Solution code:
l, r, x = map(int, input().split(' '))

ans = r // x - (l-1) // x
print(ans)

Submission status: Accepted

Solution code:
l,r,d=[int(x) for x in input().split()]
x=(r-l)//d	
if l%d==0 or r%d==0:
	x+=1

print(x)

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())

count = 0
for i in range(L, R + 1):
    if i % d == 0:
        count = count + 1

print(count)

Submission status: Accepted

Solution code:
def main():
    L, R, d = map(int,input().split())

    if L%d==0 and R%d==0:
        print(int((R-L)/d) + 1)
        return
    else:
        l = L - L % d
        r = R - R % d
        print(int((r - l)/d))
        return
    
if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())

ans = 0
for x in range(L, R+1):
  if x%d == 0:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
L, R, d = list(map(int, input().split()))

res = 0

for i in range(L, R+1):
    if i % d == 0:
        res += 1
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L,R,d = map(int,input().split())

left = (L-1)//d
right = R//d
ans = right-left
print(ans)

Submission status: Accepted

Solution code:
import math
L,R,d = map(int, input().split())

minumum = math.ceil(L/d)
maximum = R//d

if maximum - minumum >=0:
    print(maximum - minumum+1)
else:
    print(0)

Submission status: Accepted

Solution code:
l,r,d = map(int, input().split())
var=l//d
var1=r//d
ans=var1-var
if l%d==0:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
ent, saida, mul= map(int, input().split())
multiplos=[]
for x in range(ent, saida+1):
    if x%mul==0:
        multiplos.append(x)
print(len(multiplos))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L,R,d = list(map(int,input().split()))
ans = 0
for i in range(L,R+1):
    if i%d == 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
l,r,d=map(int,input().split())
c=0
for x in range(l,r+1):
  if x%d==0:
    c=c+1
print(c)

Submission status: Accepted

Solution code:
l,r,d = [int(x) for x in input().split()]
nums = [int(x) for x in range(l,r+1)]
ans = []

for i in range(len(nums)):
      if nums[i]%d == 0:
            ans.append(nums[i])

print(len(ans))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
l,r,d=map(int, input().split()) #a1 a2 a3

ans=0
for i in range(l,r+1):
  if i%d==0:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
l,r,d=map(int,input().split())
counter=0
for i in range(l,r+1):
    if(i%d==0):
        counter+=1

print(counter)

Submission status: Accepted

Solution code:
import sys
L,R,d = map(int, sys.stdin.readline().split())
# L=5
# R=10
# d=2
result = 0
for index in range(L,R+1):
    if index % d == 0:
        result += 1
        
print(result)

Submission status: Accepted

Solution code:
it = lambda: list(map(int, input().strip().split()))


def solve():
    L, R, d = it()

    cnt = 0
    for i in range(L, R + 1):
        if i % d == 0:
            cnt += 1
    print(cnt)


solve()

Submission status: Accepted

Solution code:
from sys import stdin,stdout                           #
import math                                            #
import heapq                                           #
                                                       #
t = 1                                                  #
def aint():                                            #
	return int(input().strip())                        #
def lint():                                            #
	return list(map(int,input().split()))              #
def fint():                                            #
	return list(map(int,stdin.readline().split()))     #
                                                       #	
########################################################

def main():
	l,r,d=lint()
	print(r//d-(l-1)//d)
	#code here
	return

#t=int(input())

########################################################
for i in range(t):                                     #
	#print("Case #"+str(i+1)+":",end=" ")		       #
	main()                                             #

Submission status: Accepted

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

counter = 0
for _ in range (int(S[0]),int(S[1])+1):
  if _ % int(S[2]) == 0:
    counter += 1
  
print(counter)

Submission status: Accepted

Solution code:
l, r, d = [int(x) for x in input().split()]
print(r // d - (l - 1) // d)

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())

if L%d == 0 or R%d == 0 :
    print((R-L)//d + 1)
else:
    print((R - L)//d)

Submission status: Accepted

Solution code:
l,r,d=map(int,input().split())
L=l//d
R=r//d
if l%d==0:
    print(R-L+1)
else:
    print(R-L)

Submission status: Accepted

Solution code:
l , r , d = map(int, input().split())
count = 0
for i in range(l , r + 1):
  if i % d == 0:
    count += 1
print(count)

Submission status: Accepted

Solution code:
import sys,math,collections
from collections import defaultdict

#from itertools import permutations,combinations
	
def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w') 
def get_array():
	l=list(map(int, input().split()))
	return l
def get_2_ints():	
	a,b=map(int, input().split())
	return a,b
def get_3_ints():	
	a,b,c=map(int, input().split())
	return a,b,c	
def sod(n):
	n,c=str(n),0
	for i in n:	
		c+=int(i)
	return c	

def getFloor(A, x):

	(left, right) = (0, len(A) - 1)

	floor = -1
	while left <= right:
		mid = (left + right) // 2
		if A[mid] == x:
			return A[mid]
		elif x < A[mid]:
			right = mid - 1
		else:
			floor = A[mid]
			left = mid + 1
			
	return floor
#file()	
def main():
	l,r,n=get_3_ints()
	c=0
	for i in range(min(l,r),max(l,r)+1):
		#print(i)
		if(i%n==0):
			c+=1
	print(c)		


                       

















				

			







            
			
































		








if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
l,r, d = map(int, input().split())
ans = r // d
ans -= (l-1) // d
print(ans)

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())

print((R // d) - ((L-1) //d))

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())

ans = 0
for i in range(L, R+1):
    if i % d == 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8

l, r, d = map(int,input().split())

print(r//d-(l-1)//d)

Submission status: Accepted

Solution code:
baseData = [int(i) for i in input().split(" ")]
L = baseData[0]
R = baseData[1]
d = baseData[2]

cnt = 0

for i in range(L,R + 1):
  if i % d == 0:
    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())
ans = 0
for i in range(l, r + 1, 1):
    if i % d == 0: ans += 1
print(ans)

Submission status: Accepted

Solution code:
def main():
    
    input_lines_lrd = input()
    arrLRD = input_lines_lrd.split(" ")
    l = int(arrLRD[0])
    r = int(arrLRD[1])
    d = int(arrLRD[2])
    
    cnt = 0
    for n in range(l, r+1):
        if n % d == 0:
            cnt = cnt + 1
    
    print(cnt)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
L,R,d = map(int,input().split())
i=0
for x in range (L,R+1):
    if x%d==0:
        i+=1
print(i)

Submission status: Accepted

Solution code:
l,r,d=map(int,input().split())
ct=0
for i in range(l,r+1):
  if i%d==0:
    ct += 1
print(ct)

Submission status: Accepted

Solution code:
l,r,n=map(int,input().split())
a=(r//n)-(l//n if l!=n else 0)
if l!=r:print(a)
else: print(1)

Submission status: Accepted

Solution code:
the_string = input()
L1,R1,d1 = the_string.split()
L=int(L1)
R=int(R1)
d=int(d1)
count=0
for i in range(L,R+1):
    if(i%d)==0:
        count+=1
print(count)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())
print(r//d - (l-1)//d)

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())

count = 0

for i in range(101):
  if d * i >= L and d * i <= R:
    count += 1
  if d * i > R:
    break
    
print(count)

Submission status: Accepted

Solution code:
l,r,d=map(int, input().split())

ans=r//d-(l-1)//d
print(ans)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())

def count(x):
    return x // d

print(count(r) - count(l-1))

Submission status: Accepted

Solution code:
l,r,d = map(int,input().split())
ans = 0
for i in range(l,r+1):
    if i % d == 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
import sys
#DEBUG=True
DEBUG=False
if DEBUG:
    f=open("202007_2nd/A_input.txt")
else:
    f=sys.stdin
l,h,d=map(int,f.readline().split())
ans=0
for _ in range(l,h+1):
    ans=ans+1 if _%d==0 else ans
print(ans)

Submission status: Accepted

Solution code:
l,r,d = [int(x) for x in input().split()]
C = 0
for i in range(l, r+1):
    if i % d == 0:
        C += 1
 
print(C)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
digitsArr = list(map(int, input().split()))
multipleConter = 0
for i in range(digitsArr[0], digitsArr[1]+1):
    if i % digitsArr[-1] == 0:
        multipleConter += 1

print(multipleConter)

Submission status: Accepted

Solution code:
l,r,d = list(map(int,input().split()))
ans = r//d - (l-1)//d
print(ans)

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    l, r, d = map(int, readline().split())

    ans = 0

    for i in range(l, r + 1):
        if i % d == 0:
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L,R,d = map(int,input().split())

r = R//d
l = (L-1)//d

print(r-l)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random,resource

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    l,r,d = LI()

    return r // d - (l-1) // d


print(main())

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())

print(sum(i % d == 0 for i in range(L, R + 1)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nums = list(map(int, input().split()))
print(nums[1]//nums[2]-(nums[0]-1)//nums[2])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
l, r, d = map(int, input().split())
 
print(r//d - (l-1)//d)

Submission status: Accepted

Solution code:
L,R,d = map(int,input().split())
l,r = (L-1)//d,R//d
print(r-l)

Submission status: Accepted

Solution code:
l,r,d = map(int,input().split())
     
print( r//d -(l-1)//d )

Submission status: Accepted

Solution code:
L, R, d = [int(i) for i in input().split()]
cnt = 0
for x in range(L, R+1):
    cnt += 1 if x % d == 0 else 0
print(cnt)

Submission status: Accepted

Solution code:
L,R,D=map(int,input().split())
count=0
for i in range(L,R+1):
  if i%D==0:
    count +=1
print(count)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())
ans = 0
for i in range(l, r + 1):
  if i % d == 0:
    ans += 1
print(ans)

Submission status: Accepted

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: Accepted

Solution code:
L, R, d = map(int, input().split())

ans = 0
for i in range(L, R+1):
    if i % d == 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
L, R, d = [int(x) for x in input().split()]

count = 0

for i in range(L, R + 1):
    if i % d == 0:
        count = count + 1

print(count)

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())
ans = 0
for n in range(L, R + 1):
    if n % d == 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
L,R,d=map(int,input().split())
count=0
for i in range(L,R+1):
  if i%d == 0:
    count+=1
print(count)

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())

answer = 0
while L <= R:
    if L % d == 0:
        answer += 1   
    L += 1

print(answer)

Submission status: Accepted

Solution code:
l,r,d = map(int,input().split())

cnt = 0
for i in range(l,r+1):
    if(i%d==0):
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
l,r,d = map(int,input().split())

print( r//d -(l-1)//d )

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())
ans = 0
for i in range(l, r + 1):
    if not i % d:
        ans += 1

print(ans)

Submission status: Accepted

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


def main():
    import sys
    input = sys.stdin.readline

    l, r, d = map(int, input().split())
    count = 0

    for i in range(l, r + 1):
        if i % d == 0:
            count += 1

    print(count)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
numbers = [i for i in map(int, input().split())]
number_list = [i+numbers[0] for i in range(numbers[1]-numbers[0]+1)]
count = 0
for i in number_list:
  if i % numbers[2] == 0:
    count+=1
print(count)

Submission status: Accepted

Solution code:
l, r, d = list(map(int, input().split()))
# b = list(map(int, input().split()))
# ab_sorted = sorted(ab, key=lambda x: x[0])
# ab = [list(map(int, input().split())) for i in range(n)]
# print(min(15*n, 100*(n//10+1), 100*(n//10)+15*(n % 10)))

print(r//d-(l-1)//d)

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(20000000)

MOD = 10 ** 9 + 7
INF = float("inf")


def main():
    L, R, d = map(int, input().split())

    r = R // d
    l = (L - 1) // d
    print(r - l)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())

print(r//d - (l-1)//d)

Submission status: Accepted

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: Accepted

Solution code:
l,r,n = [int(x) for x in input().split(' ')]
c=0
for i in range(l,r+1):
  if(i%n==0):
    c+=1
print(c)

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())
count = 0
for i in range(L, R + 1):
  if i % d == 0:
    count += 1
    
print(count)

Submission status: Accepted

Solution code:
ijyou,ika,sr = map(int,input().split())

count= 0

for i in range(ijyou,ika+1):
    if i % sr == 0:
        count += 1

print(count)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())

if l % d == 0:
    a = l // d
    b = r // d
    print(b-a+1)
else:
    a = l // d
    b = r // d
    print(b-a)

Submission status: Accepted

Solution code:
import math
L, R, D = map(int, input().split())

print(math.floor(R / D) - math.ceil(L / D) + 1)

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())

print(R // d - (L - 1) // d)