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 __future__ import division, print_function
 
import os,sys
from io import BytesIO, IOBase
import math
 
if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
 
 
def ii():  return int(input())
def si():  return input()
def mi():  return map(int,input().strip().split(" "))
def msi(): return map(str,input().strip().split(" "))
def li():  return list(mi())
 
def dmain():
    sys.setrecursionlimit(1000000)
    threading.stack_size(1024000)
    thread = threading.Thread(target=main)
    thread.start()
    
#from collections import deque, Counter, OrderedDict,defaultdict
#from heapq import nsmallest, nlargest, heapify,heappop ,heappush, heapreplace
#from math import log,sqrt,factorial,cos,tan,sin,radians
#from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
#from decimal import *
#import threading
#from itertools import permutations
#Copy 2D list  m = [x[:] for x in mark] .. Avoid Using Deepcopy
 
abc='abcdefghijklmnopqrstuvwxyz'
abd={'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod=1000000007
#mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]
def getKey(item): return item[1] 
def sort2(l):return sorted(l, key=getKey,reverse=True)
def d2(n,m,num):return [[num for x in range(m)] for y in range(n)]
def isPowerOfTwo (x): return (x and (not(x & (x - 1))) )
def decimalToBinary(n): return bin(n).replace("0b","")
def ntl(n):return [int(i) for i in str(n)]
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(max(n-r,1)))
 
def ceil(x,y):
    if x%y==0:
        return x//y
    else:
        return x//y+1
 
def powerMod(x,y,p):
    res = 1
    x %= p
    while y > 0:
        if y&1:
            res = (res*x)%p
        y = y>>1
        x = (x*x)%p
    return res
 
def gcd(x, y):
    while y:
        x, y = y, x % y
    return x
    
def isPrime(n) : # Check Prime Number or not 
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) : 
        if (n % i == 0 or n % (i + 2) == 0) : 
            return False
        i = i + 6
    return True
 
 
 
def read():
    sys.stdin  = open('input.txt', 'r')  
    sys.stdout = open('output.txt', 'w') 
 
 
def main():


    #for _ in range(ii()):
    l, r, d = map(int, input().split())
    x = 0
    for i in range(l, r + 1):
        while i%d == 0:
            x += 1
            break
    print(x)

    

# region fastio
# template taken from https://github.com/cheran-senthil/PyRival/blob/master/templates/template.py
 
BUFSIZE = 8192
 
 
class FastIO(IOBase):
    newlines = 0
 
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
 
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
 
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
 
 
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
 
 
def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()
 
 
if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
 
input = lambda: sys.stdin.readline().rstrip("\r\n")
 
# endregion
 
 
if __name__ == "__main__":
    #read()
    main()
    #dmain()
 
# Comment Read()

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
i = list(map(int, input().split()))
ans=0
for j in range(i[0],i[1]+1):
    if j%i[2] ==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=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())
print(r//d-(l-1)//d)

Submission status: Accepted

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

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:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
#mod = 998244353
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
  return int(readline())
l,r,d = readInts()
print(r//d - (l-1)//d)

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())
print(R // d - (L - 1)//d)

Submission status: Accepted

Solution code:
import math


def LI():
    return list(map(int, input().split()))


L, R, d = LI()
Ld = (L-1)//d
Rd = R//d
ans = Rd-Ld
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 = 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())
print(r // d - ~-l // 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())
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())

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

Submission status: Accepted

Solution code:
def main():
    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:
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())


def calc(n):
    return n // D


print(calc(R) - calc(L-1))

Submission status: Accepted

Solution code:
# @uthor : Kaleab Asfaw
from sys import stdin, stdout
# Fast IO
def input():
	a = stdin.readline()
	if a[-1] == "\n": a = a[:-1]
	return a
def print(*argv, end="\n", sep=" "):
	n = len(argv)
	for i in range(n):
		if i == n-1: stdout.write(str(argv[i]))
		else: stdout.write(str(argv[i]) + sep)
	stdout.write(end)
# Others
mod = 10**9+7
def lcm(x, y): return (x * y) / (gcd(x, y))
def comb(lst, x):
	from itertools import combination as c
	return list(comb(lst, x))
def fact(x, mod=mod):
	ans = 1
	for i in range(1, x+1): ans = (ans * i) % mod
	return ans
def arr2D(n, m, default=0):
	lst = []
	for i in range(n): temp = [default] * m; lst.append(temp)
	return lst
def sortDictV(x): return {k: v for k, v in sorted(x.items(), key = lambda item : item[1])}
def smaller(lst, x): return bisect_left(lst, x) -1
def smallerEq(lst, x): return bisect_right(lst, x) -1

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

l, r, d = list(map(int, input().split()))
print(solve(l, r, 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=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
def input(): return sys.stdin.readline().rstrip()
def main():
    l ,r, d = map(int,input().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:
L,R,d=map(int,input().split())
print(R//d-(L-1)//d)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())
a = 1
ans = 0
while a*d <= R:
  if a*d >= L:
    ans += 1
  a += 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 = list(map(int, input().split(" ")))

diff=R//d - (L-1)//d

print(diff)

Submission status: Accepted

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

diff=R//d - (L-1)//d

if d==1:
  diff=diff

print(diff)

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())

L = [i for i in range(A,B + 1)]
_ = 0
for l in L:
  if l % C == 0:
  	_ += 1
print(_)

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

ans = 0

for i in range(1,R+1):
    if i < L:
        pass
    else:
        if i % D == 0:
            ans += 1
            
print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
f,l,n=map(int,input().split())
ctr=0
for i in range(f,l+1):
  if i%n==0:
    ctr+=1
print(ctr)

Submission status: Accepted

Solution code:
# cook your dish here
lrd=list(map(int , input().split()))
l=lrd[0]
r=lrd[1]
d=lrd[2]
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())
counter = 0
for i in range(L, R + 1):
  if i % D == 0:
    counter+= 1
print(counter)

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=c+1
print(c)

Submission status: Accepted

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

L = int(lst[0])
R = int(lst[1])
d = int(lst[2])

if L % d != 0:
   L = L + d - (L % d)

if R % d != 0:
   R = R - (R % d)

result = int(((R - L) / d) + 1)

print(result)

Submission status: Accepted

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

print(comp)

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=input().split()
b = int(a[0])
c = int(a[1])
d = int(a[2])
e = int(c // d - b // d)

if b % d == 0:
  e = e+1

print(int(e))

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())
ans = r//d - l//d
if l%d == 0 and r%d == 0:
    ans += 1
print(ans)

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

Submission status: Accepted

Solution code:
l,r,d= map(int,input().split())
print(sum([1 if t%d==0 else 0 for t in range(l,r+1)]))

Submission status: Accepted

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

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:
x,y,z=map(int,input().split())
i=x
sum=0
while i<=y:
    if i%z==0:
        sum=sum+1
    i=i+1
print(sum)

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

ans = r // d - (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())
r = R//d
l = L//d
if L%d == 0:
    ans = r-l + 1
else:
    ans = r-l
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#template
def inputlist(): return [int(j) for j in input().split()]
#template
L,R,d = inputlist()
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())
 
print(b//c-(a-1)//c)

Submission status: Accepted

Solution code:
def solve():
    l,r,d = map(int,input().split())
    print(r//d - (l-1)//d)
if __name__=='__main__':
    solve()

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:
import math
l,r,d=map(int,input().split())
i=math.ceil(l/d)
c=0
while((d*i)>=l and (d*i)<=r):
  c+=1
  i+=1
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    L, R, d = map(int, input().split(' '))
    X = 0
    if L % d == 0:
        X = int(L / d) - 1
    else:
        X = int(L / d)
    print(int(R / d) - X)
main()

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())
print( r//d  -l//d + (l%d==0))

Submission status: Accepted

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

Submission status: Accepted

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

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(L, R+1):
    if(I%d == 0):
        count= count +1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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())
z=0
for i in range(L,R+1,1):
  if i%d==0:
    z+=1
print(z)

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

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

print(ans)

Submission status: Accepted

Solution code:
def main():
    L, R, d = map(int, input().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:
l, r, d = map(int, input().split())

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

Submission status: Accepted

Solution code:
L, R, d = list(map(int, input().split()))
diff = R - L + 1
ans = 0
l = [None for _ in range(diff)]
for i in range(diff):
   l[i] = L + i
   if l[i] % d == 0:
      ans += 1
print(ans)

Submission status: Accepted

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

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:
R,L,d = map(int, input().split())
counter = 0
for i in range(R, L+1):
  if i%d == 0:
    counter += 1
print(counter)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! python3
# coding:utf-8

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

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
# 標準入力
input = list(map(int, input().split())) # map関数: listの各要素に対して一定の処理を行う
min, max, div = input[0], input[1], input[2]
count = 0
for i in range(min, max+1):
    if i % div == 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(l, r + 1):
    if i % d == 0:
        count += 1
print(count)

Submission status: Accepted

Solution code:
from math import floor, ceil
l, r, d = map(int, input().split())
print(floor(r/d) - ceil(l/d) +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:
L, R, d = map(int,input().split())
ans = 0
while L <= R:
    if L % d == 0:
        ans += 1
    L += 1
print(ans)

Submission status: Accepted

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

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())
ct = 0
for i in range(L, R + 1):
    if i % d == 0:
        ct += 1
print(ct)

Submission status: Accepted

Solution code:
L, R, d = list(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())

i=0
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

while l<=r:

    if l%d == 0:
        
        ans+=1

    l+=1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=list(map(int, input().split()))
L=x[0]
R=x[1]
d=x[2]
res=0
while L<=R:
  if L%d==0:
    res+=1
  L+=1
print(res)

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))

answer = int(0)

for i in range(A[0],A[1]+1):
  if i % A[2] == 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())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
main=list(map(int,input().split()));count=0
for i in range(main[0],main[1]+1):
    if(i%main[2]==0): count=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:
num1, num2, num3 = (int(x) for x in input().split())
count = 0

for i in range(num1, num2+1):
    if i % num3 == 0:
        count = count + 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    L, R, d = (int(i) for i in input().split())
    ans = R//d - (L-1)//d
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    L, R, d = (int(i) for i in input().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:
l, r, d = map(int, input().split())

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

Submission status: Accepted

Solution code:
def main():
    L, R, d = map(int, input().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:
import sys


def handler():
    l, r, d = [int(i) for i in input().strip().split()]
    sys.stdout.write('%d\n' % (r // d - (l - 1) // d))


def main():
    while True:
        try:
            handler()
        except ValueError:
            continue
        except EOFError:
            break


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
"""
                            pppppppppppppppppppp
                         ppppp  ppppppppppppppppppp
                      ppppppp    ppppppppppppppppppppp
                      pppppppp  pppppppppppppppppppppp
                      pppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppppp
       ppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppp
      pppppppppppppppppppppppppppppppppppppppppppppppp  ppppppppppppppppppppp
     ppppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppppp
    ppppppppppppppppppppppppppppppppppppppppppppppp    pppppppppppppppppppppppp
   pppppppppppppppppppppppppppppppppppppppppppppp     pppppppppppppppppppppppppp
  ppppppppppppppppppppppppppppppppppppppppppppp      pppppppppppppppppppppppppppp
  pppppppppppppppppppppppppppppppp               pppppppppppppppppppppppppppppppp
  pppppppppppppppppppppppppppp     pppppppppppppppppppppppppppppppppppppppppppppp
  ppppppppppppppppppppppppppp    pppppppppppppppppppppppppppppppppppppppppppppppp
    pppppppppppppppppppppppp  pppppppppppppppppppppppppppppppppppppppppppppppppp
     ppppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppppp
      pppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppp
       ppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppppp
                              pppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppp  pppppppp
                              ppppppppppppppppppppp    ppppppp
                                 ppppppppppppppppppp  ppppp
                                    pppppppppppppppppppp
"""


import sys
from functools import lru_cache, cmp_to_key
from collections import defaultdict as dd, deque, Counter as C
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(var, end="\n"): sys.stdout.write(str(var)+end)
def outa(*var, end="\n"): sys.stdout.write(' '.join(map(str, var)) + end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


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

Submission status: Accepted

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

Submission status: Accepted

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

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

x = -(-l//d)
y = r//d
print(y-x+1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect


def zz():
    return list(map(int, sys.stdin.readline().split()))


def z():
    return int(sys.stdin.readline())


def S():
    return sys.stdin.readline()


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


l, r, d = zz()
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())

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

print(a)

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:
L, R, d = list(map(int, input().split()))

L_int = int(L/d)
R_int = int(R/d)

L_mod = L%d
R_mod = R%d


print(R_int - L_int + 1 - (L_mod!=0))

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 math
L,R,d = map(int, input().strip().split())
x=math.ceil(L/d)
y=math.floor(R/d)
print(y-x+1)

Submission status: Accepted

Solution code:
#import sys
#input = sys.stdin.readline

import math
from collections import defaultdict,deque
ml=lambda:map(int,input().split())
ll=lambda:list(map(int,input().split()))
ii=lambda:int(input())
ip=lambda:list(input())
ips=lambda:input().split()

"""========main code==============="""

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

Submission status: Accepted

Solution code:
import math

lrd=input().split()
l=int(lrd[0])
r=int(lrd[1])
d=int(lrd[2])
a=math.ceil(l/d)
b=math.floor(r/d)
print(b-a+1)