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:
a=input().split(' ')
a[0]=int(a[0])
a[1]=int(a[1])
a[2]=int(a[2])
c=a[0]
m=0
while c<a[1]+1:
    if c%a[2]==0:
        m=m+1
    c=c+1
print(m)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

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:
from sys import stdin,stdout
l,r,d=list(map(int,stdin.readline().strip().split()))
c=0
if l%d==0 and r%d==0:
    stdout.write(str(int(r/d)-int(l/d)+1)+'\n')
else:
    stdout.write(str(int(r/d)-int(l/d))+'\n')

Submission status: Accepted

Solution code:
i = list(map(int, input().split())) #i_1 i_2を取得し、iに値を入れる

print(i[1] // i[2] - (i[0]-1)//i[2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, M, K = map(int, input().split())
count=0
for i in range(M-N+1):
    ans=N%K
    if ans==0:
        count=count+1
    N=N+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())

a=(l-1)//d
b=r//d

print(b-a)

Submission status: Accepted

Solution code:
l,r,d=map(int,input().split())
if l%d!=0:
    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())
cnt=0
for i in range(l,r+1):
    if (i%d)==0:
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
def resolve():
    L,R,d=pin()
    cnt=0
    for i in range(L,R+1):
        if i%d==0:cnt+=1

    print(cnt)
#%%submit!
resolve()

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

print(cnt)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
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())
l = [x for x in range(L, R + 1) if x % d == 0]
print(len(l))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

line = input().split(' ')
L = int(line[0])
R = int(line[1])
d = int(line[2])
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())
cnt = 0
for i in range(a, b+1):
    if i % c == 0:
        cnt += 1
print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-

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

start = (l-1) // d
end = r // d
ans = end - start

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
li =list(map(int,input().split()))
n =li[0]
m =li[1]
k =li[2]
count =0
for i in range(n,m+1):
    if i%k ==0:
        count +=1

print(count)

Submission status: Accepted

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

Solution code:
l,r,d = map(int,input().split())
cnt=0
for i in range(r-l+1):
  if (i+l)%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,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:
from sys import stdin
input = stdin.readline

L,R,d = [int(x) for x in input().split()]
ans = 0
for i in range(L, R+1):
    if i % d == 0:
      ans = ans + 1
    if i == R:
      break
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
    else:
        continue
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

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())
a = r // d
b = (l-1) // d
print(a-b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,c=list(map(int, input().split())) 
kotae1=math.floor(b/c)
kotae2=math.floor(a/c)
ans=kotae1-kotae2
if(a%c==0):
    ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, n = map(int, input().split())
count = 0
for k in range(a,b+1):
    if k % n == 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 = input("")
aa = a.split(" ")
aa = [int(s) for s in aa]
L = aa[0]
R = aa[1]
d = aa[2]
aaa = []
for i in range(L,R+1):
    aaa.append(i%d)
print(aaa.count(0))

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())
A = L // d
B = R // d
C = B - A
if (L % d) == 0 :
  print(C + 1)
else :
  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())

a= L // d
b= R // d
c = L % d

if(d==1 or d==L ):
    print(b-a+1)
elif(c==0):
    print(b-a+1)
else:
    print(b-a)

Submission status: Accepted

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

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().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())
if L%d==0 and R%d==0:
    print(int(R/d-L/d+1))
elif L%d==0 and R%d!=0:
    print(int(R//d-L/d+1))
elif  L%d!=0 and R%d==0:
    print(int(R/d-L//d))
else:
    print(int(R//d-L//d))

Submission status: Accepted

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

num = 0

for i in list(range(L,R+1)):

  if i % d == 0:
    num += 1

print(num)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
import itertools as it
import collections as cl
import math
from functools import reduce

def li():
    return [int(x) for x in input().split()]

L, R, d = li()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(2 * 10**6)


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


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

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
d=c
i=1
ct=0
while True:
    c=d*i
    
    if(c>=a and c<=b):
        ct=ct+1
        
    i=i+1
    if(c>=a and c>b):
        break
print(ct)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

number_list = range(l, r+1, 1)
answer_list = []
for i in number_list:
    if i % d == 0:
        answer_list.append(i)

print(len(answer_list))

Submission status: Accepted

Solution code:
import math

L, R, d = map(int, input().split())
Lt = L%d
Rt = R%d
ans = 0

if Lt!=0 and Rt!=0:
    ans = math.floor(R/d) - math.floor(L/d)
elif Lt==0 and Rt==0:
    ans = int(R/d - L/d +1)
elif Lt!=0 and Rt==0:
    ans = int(R/d) - math.floor(L/d)
else:
    ans = math.floor(R/d) - int(L/d)

print(ans)

Submission status: Accepted

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

d = b - a

n = int(d / c)

if b % c == 0:
  n += 1

print(n)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
L,R,d=map(int,input().split())
if d==1:
    print(R-L+1)
else:
    G=0
    A=0
    for i in range(0,100):
        i=i+1
        G=d*i
        if G>=L:
            if G<=R:
                A=A+1
            else:
                print(A)
                break

Submission status: Accepted

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

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

print(h - l)

Submission status: Accepted

Solution code:
from sys import stdin,stdout
#int(stdin.readline())
l,r,d=map(int,stdin.readline().split())
left=l//d*d
if left<l:left+=d
right=r//d*d
#print(left,right)
print((right-left)//d+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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:
try:
  l,r,d=map(int,input().split())
  ans=0
  for i in range(l,r+1):
    if i%d==0:
      ans+=1
  print(ans)
except:
  pass

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:
param = input()
min, max, power = (param.split())

count = 0
for i in range(int(min), int(max)+1):
    if i % int(power) == 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:
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())

ll = L//d
if L % d != 0 :
    ll += 1
rr = R//d

print(rr-ll+1)

Submission status: Accepted

Solution code:
import math
from collections import defaultdict

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

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:
li = list(map(int, input().split())) 
L = li[0]
R = li[1]
d = li[2]

#print(L)
#print(R)
#print(d)

count = 0

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

print(count)

Submission status: Accepted

Solution code:
lrd = input('')
l = int(lrd.split()[0])
r = int(lrd.split()[1])
d = int(lrd.split()[2])

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

print(cnt)

Submission status: Accepted

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

l = int(s[0])
r = int(s[1])
d = int(s[2])

count = 0
i = 0

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

print(count)

Submission status: Accepted

Solution code:

# スペース区切りの整数の入力
a, b, c = map(int, input().split())


x_1 = b // c
x_2 = (a-1)// c

res = x_1 - x_2

print("{}".format(res))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

te=R-L+1
num=0

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

print(num)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
d = input("")
list = d.split()

i = int(list[0])
count = 0
while i <= int(list[1]):
    if i % int(list[2]) == 0:
        count = count + 1
    i = i + 1

print(count)

Submission status: Accepted

Solution code:
import math 
a,b,n = map(int,input().split())
ans = b//n - (a-1)//n
print(ans)

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:
a,b,c = input().split()
 
count = 0
num = int(a)

while num <= int(b):
  if num % int(c) == 0:
    count+=1
  num += 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:
import sys

def L(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI():return list(map(int,sys.stdin.readline().rstrip().split()))
def LS():return list(sys.stdin.readline().rstrip().split())

def anser(prod):
    print(prod%(10**9+7))
    exit()

def solver(L,R,d):
    ans = 0

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

    print(ans)

def main():

    L,R,d = LI()

    solver(L,R,d)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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 = input().split(" ")

L = int(l)
R = int(r)
D = int(d)

result=[]

for i in range(R - L + 1):
    if ((i + L) % D == 0):
        result.append(i)

print(len(result))

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

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

Submission status: Accepted

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

s1 = (l-1) // d
s2 = r // d

print(s2-s1)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())
# print(f"{l} {r} {d}")

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

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

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:
def multiples(l,r,d):
  
    c = 0
    if d == 0:
      return 0
    if d==1:
        return r-l+1
    i = l
    while i<=r:
        
        if i%d==0:
            c += 1
            i += d
            continue

        i += 1
        
    return c


if __name__ == '__main__':

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

    result = multiples(l,r,d)
    print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# atcoder 
# Türkler var mı?
# Herkese memnün oldum
import sys

iimr = lambda: map(int, sys.stdin.readline().rstrip().split())
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
MOD = (10 ** 9) + 7  # operować sobie na typie int32_t


def 関数(l,r,d):
    res = 0
    for i in range(l, r+1):
        res += i % d == 0
    return res

def çözmek():
    L, R, d = iimr()
    res = []
    res.append(関数(L, R, d))
    print(*res, sep="\n")

if __name__ == "__main__":
    çözmek()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(a)

Submission status: Accepted

Solution code:
L, R, d = [int(_) for _ 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())
ans = 0
for i in range(l, r+1):
    if i%d == 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# atcoder 
# Türkler var mı?
# Herkese memnün oldum
import sys

iimr = lambda: map(int, sys.stdin.readline().rstrip().split())
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
MOD = (10 ** 9) + 7  # operować sobie na typie int32_t


def 関数(l,r,d):
    res = 0
    for i in range(l, r+1):
        if i % d == 0:
            res += 1
    return res

def çözmek():
    L, R, d = iimr()
    res = []
    res.append(関数(L, R, d))
    print(*res, sep="\n")

if __name__ == "__main__":
    çözmek()

Submission status: Accepted

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

Submission status: Accepted

Solution code:


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

x = l%d
if l%d != 0:
    first = l + (d - l%d)
else:
    first = l

last = r - r%d

print((last - first)//d + 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
[L, R, d] = list(map(int, input().split()))
max_d = R // d
min_d = L // d
sho_R = R % d
sho_L = L % d
if sho_R == 0 and sho_L == 0:
  ans = max_d - min_d + 1
else:
  ans = max_d - min_d
print(ans)

Submission status: Accepted

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

num_lower = int((L - 1) / d)
num_upper = int(R / d)
ans = num_upper - num_lower

print(ans)

Submission status: Accepted

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from scipy.sparse.csgraph import floyd_warshall
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations, combinations_with_replacement
from heapq import heappop, heappush, heapify
from fractions import gcd
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7

def main():
    l,r,d = map(int,input().split())
    ans = r//d - l//d
    if l%d == 0:
        ans += 1
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

l,r,d=map(int,input().split())
i=1
j=0
result=0
while result<=r:
  if result>=l:
    j +=1
  result=d*i
  i+=1
print(j)

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

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


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

print(len(ans))

Submission status: Accepted

Solution code:
li = list(map(int,input().split()))
count = 0
for num in range(li[0],li[1]+1):
  if num % li[2] == 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:

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:
l, r, d = input().split()
l = int(l)
r = int(r)
d = int(d)

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

print(cnt)

Submission status: Accepted

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

L = A[0]
R = A[1]
d = A[2]
result = 0
tmp = L

for i in range(R):
    if i+1 < L:
        continue
    if i+1 > R:
        break
    
    if (i+1) % d == 0:
        result += 1
    

print(result)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
L,R,d = map(int,input().split())
count = 0
tmp = 0
while(True):
    if tmp < L:
        tmp = tmp + d
    elif L <= tmp and tmp<= R:
        count += 1
        tmp = tmp + d
    else:
        break
if d == 1:
    print(R- L + 1)
else:
    print(count)

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

Submission status: Accepted

Solution code:
input_line = input().split(" ")
min_fig = int(input_line[0])
max_fig = int(input_line[1])
sample = int(input_line[2])
if min_fig % sample == 0:
    minus_num = int(min_fig / sample) -1
else:
    minus_num = int(min_fig / sample)
plus_num = int(max_fig / sample)
print(plus_num-minus_num)

Submission status: Accepted

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

for i in diff_list:
    if i%d == 0:
        cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
#=input()
#=int(input())
l,r,d=map(int,input().split())
#=list(map(int,input().split()))
#=[list(map(int,input().split())) for _ in range()]

ll = math.ceil(l / d)
rr = r // d
print(rr - ll + 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
if L % D == 0:
  ANS = 1
elif R % D == 0:
  ANS += 1
 
ANS += (R-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):
  if i % d == 0:
    cnt += 1
    
print(cnt)

Submission status: Accepted

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