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:
li=input().split()
l=int(li[0])
r=int(li[1])
d=int(li[2])
L=int(l/d)
R=int(r/d)
A=R-L
if l%d==0:
    if r%d==0:
        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())
ans = 0

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

Submission status: Accepted

Solution code:
input = input().split()
L = int(input[0])
M = int(input[1])
d = int(input[2])

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

print(num)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if L%d:
    Ans = R//d - L//d
else :
    Ans = R//d - L//d +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(len([i for i in range(L, R+1) if i % d == 0]))

Submission status: Accepted

Solution code:
from itertools import product
L, R, d=map(int,input().split())
#C = []
#for i in range(H):
#    C.append((input().replace(".","0").replace("#","1")))
# S=list(map(int,input().split()))
# B=list(map(int,input().split()))
count = 0
for i in range(R+1):
    if i>=L and 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(1, 101):
    if L <= i <= R and i % d == 0:
        count += 1
print(count)

Submission status: Accepted

Solution code:
import math

a = list(map(int,input().split()))
l = a[0]
r = a[1]
d = a[2]

f = math.floor(l/d)
e = math.floor(r/d)

an = e-f
if l%d==0:
  an=an+1
print(an)

Submission status: Accepted

Solution code:
import math

count = 0
L,R,d = list(map(int,input().split()))
c = math.ceil(L/d)
p = math.floor(R/d)
print(p-c+1)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

#L, R, d = map(int, input().parse())
L, R, d = map(int, input().split())
start_d = int(math.ceil(L / d))
end_d = int(math.floor(R / d))
print(end_d - start_d +1)

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 = map(int, input().split())
x = list(range(L, R+1))
y = [i for i in x if i % d == 0]
print(len(y))

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:
#!/usr/bin/env python3


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

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



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

L,R,d = map(int, input().split())
N = L
count = 0

while N <= R:
    if N % d ==0:
        count += 1
        N += 1
    else:
        N += 1

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from heapq import *
from collections import *
import os
import sys
sys.setrecursionlimit(1<<30)
from io import BytesIO, IOBase
import math
import bisect
from math import inf

 
ins = lambda: [int(x) for x in input()]
inp = lambda: int(input())
inps = lambda: [int(x) for x in input().split()]
 
from fractions import Fraction as F
def main():
    
    l,r,a=inps()
    b=(l+a-1)//a
    e=(r)//a
    
    print(e-b+1)




  
 
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")
 
 
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
 
# endregion
 
if __name__ == "__main__":
    main()
# import threading,sys
# sys.setrecursionlimit(1000000)
# threading.stack_size(1024000)
# thread=threading.Thread(target=main)
# thread.start()

Submission status: Accepted

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

Submission status: Accepted

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

count = 0

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

print(count)

Submission status: Accepted

Solution code:
import math

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

a = math.floor(R/d)-math.ceil(L/d) + 1


print(a)

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

numlist = [n for n in range(L, R+1)]
count = 0
i = 0
while i <= 100:
    if i * d in numlist:
        count += 1
    i += 1

print(count)

Submission status: Accepted

Solution code:
import math

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


def b():
    print('')



def c():
    print('')



def d():
    print('')


a()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
L,R,d = map(int, input().split())

cnt = d
Ans = 0

while cnt <= R:
  if cnt >= L and cnt <= R:
    Ans += 1

  cnt += 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

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

Ld = math.floor(L / d)
Rd = math.floor(R / d)

if L % d == 0:
    ans = Rd - Ld + 1
else:
    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:
import math
import collections
import bisect
from collections import deque
from copy import copy, deepcopy


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

print(
  	(1 if a % c == 0 else 0) +
  	(b // c - a // c)
)

Submission status: Accepted

Solution code:

L, R ,d= map(int,input().split())
counter=0
for i in range(R+1-L):
  num = i+L
  if num%d == 0:
    counter+=1
print(counter)

Submission status: Accepted

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

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

print(len(ans))

Submission status: Accepted

Solution code:
#import numpy as np
#import math
#from decimal import *
#from numba import njit

#@njit
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)

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import bisect
from functools import lru_cache
from collections import defaultdict
inf = float('inf')
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**6)
def input(): return sys.stdin.readline().rstrip()
def read():
  return int(readline())
def reads():
  return map(int, readline().split())
L,T,D=reads()
count=0
for i in range(L,T+1):
  if i%D==0:
    count+=1
print(count)

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())
count = 0
i = 1
while i * d <= R:
    j = i * d
    if j >= L and j <= R:
        count +=1
    i += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l,r,d = map(int,input().split())
A = []
for i in range(l,r+1):
    A.append(i)
cnt = 0
for i in A:
    if i % d == 0:
        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=(int(x) for x in input().split())
i=L
ans=0
while(i<=R):
  if(i % d == 0):
    ans+=1
  i+=1
print(ans)

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:
import math

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
import  math
import fractions
from collections import defaultdict
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

L,R,d=nm()
if(L%d==0):
    ans=R//d-L//d+1
else:
    ans=R//d-L//d

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

import collections
from functools import lru_cache
from math import floor, ceil


def read():
    return input().strip()


def readInt():
    return int(input().strip())


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


def solve(l, r, d):
    return floor(r/d) - ceil(l/d) + 1


[L, R, d] = readList()
print(solve(L, R, d))

Submission status: Accepted

Solution code:
from sys import stdin
input_line = stdin.readline()
L, R, d = input_line.split(' ')
L = int(L)
R = int(R)
d = int(d)

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

n = L
i = 0
while n <= R:
    if n % d == 0:
        i = i + 1
        n = n + d
    else:
        n = n + 1

print(i)

Submission status: Accepted

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

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

gap = (d-l%d)%d

if gap > r-l:
    print(0)
else:
    print(1 + (r-l-gap)//d)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

numbers = input().split(" ")
l = int(numbers[0])
r = int(numbers[1])
d = int(numbers[2])

result = 0

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

print(result)

Submission status: Accepted

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

top = b // c
if a%c == 0:
  bottom = a//c - 1
else:
  bottom = a//c

print(top-bottom)

Submission status: Accepted

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

i = 0
cnt=0

while d*i <= R:
    if L <= d*i <= R:
        cnt += 1
    i += 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())
count=0
for i in range(l,r+1):
  if i%d==0:
    count+=1
    
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L, R, d = [int(x) for x 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:
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=int(0)

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

Submission status: Accepted

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

Submission status: Accepted

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

lst = list(range(d, 101, d))

ret = list(filter(lambda x: L <= x <= R, lst))

# print(ret)
print(len(ret))

Submission status: Accepted

Solution code:
n=input().split()
L=int(n[0])
R=int(n[1])
d=int(n[2])


list = [i for i in range(L, R+1) if i % d== 0]
print(len(list))

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:
a,b,c = map(int, input().split())
tmp = a//c
tmp2 = b//c
tmp3 = a % c
if tmp3 == 0:
  print(int(tmp2 - tmp) + 1)
else:
  print(int(tmp2 - tmp))

Submission status: Accepted

Solution code:
L,R,d=list(map(int,input().split()))
q=[]
for i in range(L,R+1):
    s=i%d
    if s == 0:
        q.append(i)
print(len(q))

Submission status: Accepted

Solution code:
def main():
    L,R,d = map(int,input().split())
    maxnum = R // d
    lownum = L // d
    add = 0
    if L % d == 0:
        add = 1
    print(maxnum - lownum + add)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L,R,d=map(int,input().split())
start = int(L/d)*d
x = 0
while True:
    if start < L:
        start += d
    if start  > R:
        break
    if start>=L and start <=R:
        x+=1
        start +=d
print(x)

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:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


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

if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())
w = 1
count = 0
if l % d == 0:
    start = l // d
else:
    start = (l // d) + 1
while w < r:
    w = d * start
    if w <= r:
        start += 1
        count += 1

print(count)

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

L, R, D = map(int, read().split())

print(sum(x % D == 0 for x in range(L, R + 1)))

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    s = list(map(int,input().split()))
    count = 0
    for i in range(s[0], s[1]+1):
        if i%s[2] == 0:
            count += 1

    print(count)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())
mul = 0
ans = 0
while mul <= r:
    mul += d
    if mul >= l and mul <= r:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 初期入力
import sys
input = sys.stdin.readline
L,R,d = (int(i) for i in input().split())
count_L =0
count_R =0
for i in range(1,101):
    if i*d <L:
        count_L +=1
    
    if i*d <=R:
        count_R +=1
ans =count_R -count_L
print(ans)

Submission status: Accepted

Solution code:
from math import *
l,r,d=map(int,input().split())

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

Submission status: Accepted

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

if L % d == 0:
    a = (L // d) -1
else:
    a = L // d

b = R // d

print(b-a)

Submission status: Accepted

Solution code:
s, e, b = [int(i) for i in input().split()]

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

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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''Author- Akshit Monga'''
t=1
for _ in range(t):
    l,r,d=map(int,input().split())
    ans=r//d-l//d
    if l%d==0:
        ans+=1
    print(ans)

Submission status: Accepted

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

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


def main():
    l = [int(e) for e in si().split()]
    lower = l[0]
    upper = l[1]
    q = l[2]
    start = lower//q
    end = upper//q
    cnt = end-start+1
    if q*start < lower:
        cnt -= 1
    print(cnt)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b,c=(int(x) for x in input().split())
n=a
ran=b-a+1
counter=0
for num in range(ran):
 if n % c == 0:
  counter += 1
 n += 1
print(counter)

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

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())
count_1 = (R - L) // d 
count_2 = 0
if L % d == 0 or R % d == 0:
    count_2 += 1
ans = count_1 + count_2
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:
L,R,d=map(int,input().split())
a=R//d
b=L//d
if L%d==0:
  print(a-b+1)
else:
  print(a-b)

Submission status: Accepted

Solution code:
L,R,d=list(map(int, input().split(' ')))
u=0
l=L
while l!=R+1:
    if l%d==0:
        u=u+1
    l=l+1
print(u)

Submission status: Accepted

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

a = int(R/d)
b = int(L/d)

if(L % d == 0):
    print(a-b+1)
else:
    print(a-b)

Submission status: Accepted

Solution code:
in_list = input().split(' ')
L = in_list[0]
R = int(in_list[1])
d = int(in_list[2])
num = int(L)
count = 0


while num <= R:
    if num%d == 0:
        count +=1
    num +=1

print(count)

Submission status: Accepted

Solution code:
s = input().split()
intL = int(s[0])
intR = int(s[1])
intD = int(s[2])

cnt = 0
wk = intL
while wk <= intR:
    if (wk % intD == 0) :
        cnt += 1
    wk += 1

print(cnt)

Submission status: Accepted

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

def multiples(l, r, d):
    m = d
    count = 0
    while (m <= r):
        if (m >= l and m <= r):
            count += 1
        m += d
    return count

print(multiples(l, r, d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import copy

def main():
  L, R, d = map(int, input().split())
  multiply = copy.copy(d)
  nums = []
  n = 1
  ans = []
  while d < R + 1:
      d = multiply * n 
      nums.append(d)
      n = n + 1
  for i in range(len(nums)):
      if nums[i] < L:
          continue
      elif nums[i] > R:
          continue
      else:
        ans.append(nums[i])
  print(len(ans))
main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L,R,d=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:
l,r,d = map(int, input().split())
i = l
a = 0
while i <= r:
    if i % d == 0:
        a += 1
    i += 1
print(a)

Submission status: Accepted

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

f = l//d
e = r//d

if l%d == 0:
  print(e-f+1)
else:
  print(e-f)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L, R, d=map(int, input().split())
j=0
for i in range(101):
    if (L <= i*d) & (i*d<=R):
        j+=1
print(j)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input().split(" ")
L=int(N[0])
R=int(N[1])
d=int(N[2])
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())
cntR = R // d
cntL = L // d
if L % d == 0:
  cntL = cntL - 1

print(cntR - cntL)

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, 1):
    if i % d == 0:
        s += 1
print(s)

Submission status: Accepted

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

if d!=1:
    if L!=1:
        ansR = R / d
        ansL = (L-1) / d
        #print(ansR,ansL)
        ans = int(ansR) - int(ansL)
    else:
        ansR = R / d
        ansL = L / d
        #print(ansR,ansL)
        ans = int(ansR) - int(ansL)
else:
    ans = R

print(int(ans))

Submission status: Accepted

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

mod = l % d
cnt = 0
for i in range(1,100//d + 1):
  if l <= i*d and r >= i*d:
    cnt += 1
  
print(cnt)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
l,r,d=map(int,input().split())
lkosuu=int(l/d)
rkosuu=int(r/d)
lamari=int(l%d)
kosuu=rkosuu-lkosuu
if lamari==0:
  kosuu+=1
print(kosuu)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

D =[]

for i in range(L,R+1):
    D.append(i)


#print(D)
count = 0
for j in D:
    if j % d == 0:
        count += 1

print(count)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

flag = 0

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

print(flag)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())
ans = 0
count = 0
count_ans = 0

while ans <= R:
    count += 1
    ans = d * count
    if(L <= ans | ans <= R):
        count_ans += 1
        
print(count_ans)

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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

Submission status: Accepted

Solution code:
from __future__ import print_function
import sys


if sys.subversion[0] == "PyPy":
    import io, atexit

    sys.stdout = io.BytesIO()
    atexit.register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

    sys.stdin = io.BytesIO(sys.stdin.read())
    input = lambda: sys.stdin.readline().rstrip()
RS = raw_input
RA = lambda x=int: map(x, RS().split())
RN = lambda x=int: x(RS())


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





l, r, d = RA()
solve()

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)