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

long = R - L

count = 0

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

print(count)

Submission status: Accepted

Solution code:
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

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

L, R, d = input_int()

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(j)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l,r,d= list(map(int, input().strip().split()))
if r%d==0:
    s=r//d
else:
    s=r//d
if l%d==0:
    t=l//d
else:
    t=l//d+1
    
print(s-t+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())
print((R//d)-((L-1)//d))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

num = [n for n in range(L, R+1) if n%d==0]

print(len(num))

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(1, 101):
    if L <= d*i and d*i <= R:
        count += 1
    if d*i > R:
        break
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L,R,d=map(int,input().split())
count = 0
for num in range(101):
  if(d*num==R):
    count += 1
    break
  if(d*num>R):
    break
  if(d*num>=L):
    count += 1
print(count)

Submission status: Accepted

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

import sys

def main():
    input = sys.stdin.readline
    l,r,d = map(int, input().split())
    l_count = l // d
    r_count = r // d
    result = 0
    if l % d == 0:
        print(r_count - l_count + 1)
    else:
        print(r_count - l_count)

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(s)

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
L, R, d = [int(v) for v in input().strip().split(" ")]
# int(input().strip())
# eval(input().strip())

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

print(num)

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

Submission status: Accepted

Solution code:
import sys
L, R, d = map(int, sys.stdin.readline().strip().split())

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

Submission status: Accepted

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

    return

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

a = l // d 
b = r // d

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

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

I1 = input().split()

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

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

print(i)

Submission status: Accepted

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

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

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

print(count)

Submission status: Accepted

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

memo = [0]*(R+1)

i = 1
while d*i <= R:
  memo[d*i] = 1
  i += 1
  
print(sum(memo[L:]))

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, Counter, namedtuple, deque
import itertools
import functools
import bisect
import heapq
import math
import copy
# from fractions import gcd

MOD = 10 ** 9 + 7
# MOD = 998244353
# sys.setrecursionlimit(10**8)


l, r, d = map(int, input().split())
a = l + (d - l%d) if l%d > 0 else l
b = r - r%d
# print(a, b)
print((b-a)//d + 1)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

up = r // d
down = l // d
down_sur = l % d

if down_sur == 0:
    print(up - down + 1)
else:
    print(up -down)

Submission status: Accepted

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

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

print(a)

Submission status: Accepted

Solution code:
import math

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

Li = math.ceil(L/d)
Ri = int(R/d)

ans = Ri-Li+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())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

main()

Submission status: Accepted

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


if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

d = int(a/c)

e = int(b/c)

z = 0

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

Submission status: Accepted

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

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

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 = 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(1, 101):
    if l<=i and r >= i and 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 = list(map(int, input().split()))
count = 0

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

Submission status: Accepted

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

print(a)

Submission status: Accepted

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

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 = (int(x) for x in input().split())
a = L // d
b = R // d
if L % d == 0:
    b += 1
print(b - a)

Submission status: Accepted

Solution code:
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
#=================================================
l,r,d=INPUT()
count=0
i=d*int(math.ceil(l/d))
while(i<=r):
    if i%d==0:
        count+=1
    i+=d
print(count)

Submission status: Accepted

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

s_parts = L // d

if L % d == 0:
  s = s_parts
  
else:
  s = s_parts + 1
  
b = R // d

print(b - s + 1)

Submission status: Accepted

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

from pprint import pprint
from collections import deque, defaultdict
import itertools
import math
import sys

sys.setrecursionlimit(10 ** 6)
INF = float('inf')


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(" "))
c=0
for i in range(l,r+1,1):
    if i%d==0:
        c+=1
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# n = int(input())
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, 1):
  if i % d == 0:
      ans += 1
        
print(ans)

Submission status: Accepted

Solution code:
import sys
import math

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


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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
import numpy as np
l, r, d = map(int, input().split()) 

arr = np.arange(l,r+1)
ans = 0
for i in range(r-l+1):
    if arr[i]%d == 0:
        ans = ans +1
print(ans)

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:
import sys
import numpy as np


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

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

print(o)

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())
res = 0
for i in range(l, r+1):
  if i%d == 0: res += 1

print(res)

Submission status: Accepted

Solution code:
#A
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:
FAST_IO = 1
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()

    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())
rrmm = lambda n: [rrm() for _ in xrange(n)]

L, R, D = rrm()
L = (L/D+int(L%D!=0))*D
R = R/D*D
n = R/D-L/D+1
print(n)

Submission status: Accepted

Solution code:
L,R,d = list(map(int, input().split()))
ans = 0
n = L
while(n<=R):
  if(n%d==0):
    ans += 1
  n += 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:
# your code goes here
l, r, d = list(map(int, input().split()))
diff = r-l
ans = diff//d
if r%d==0:
	ans+=1
print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
min, max, b = map(int, input().split())
result = 0
for i in range(min, max + 1):
  if i % b == 0:
    result += 1

print(result)

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:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

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

print(count)

Submission status: Accepted

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

count = 0

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

Submission status: Accepted

Solution code:
start,end,num=input().split()

li=[int (i) for i in range(int(start),int(end)+1) if int(i)%int(num)==0]
print(len(li))

Submission status: Accepted

Solution code:
s = list(map(int, input().split())) 
L = s[0]
R = s[1]
d = s[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())
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())
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:
nn=input("").split(" ")
l=int(nn[0])
r=int(nn[1])
d=int(nn[2])
i=l
s=0
while(i<r+1):
    if (i%d==0):
        s+=1
    


    i+=1
print(s)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import numpy as np
import math
import collections
import copy
from collections import deque 
from functools import reduce
from itertools import product

# input = sys.stdin.readline

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

print(count)

Submission status: Accepted

Solution code:
import math
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:
l,r,k=map(int,input().split())
ans=0
for i in range(l,r+1):
  if i%k==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())
if d == 1:
    print(R-L+1)
else:
    if R == L:
        if R % d == 0:
            print(1)
        else:
            print(0)
    else:
        print(R//d - L//d)

Submission status: Accepted

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

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(R//d-L//d+(L%d==0))

Submission status: Accepted

Solution code:
#!/usr/bin/env python
import math

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

    print(ret)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python
"""エイシング プログラミング コンテスト 2020: A - Number of Multiples
https://atcoder.jp/contests/aising2020/tasks/aising2020_a
"""


def main():
    L, R, d = list(map(int, input().split()))
    ans = 0
    for n in range(L, R + 1):
        if n % d == 0:
            ans += 1
    print('{}'.format(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:
L, R, d = map(int, input().split())
r = 0
for i in range(L, R+1):
    if i % d == 0:
        r += 1
print(r)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L, R, d = list(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:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(500005)


def solve(L: int, R: int, d: int):
    counter = 0
    for i in range(L,R+1):
        if (i % d == 0):
            counter += 1
    print(counter)



# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    L = int(next(tokens))  # type: int
    R = int(next(tokens))  # type: int
    d = int(next(tokens))  # type: int
    solve(L, R, d)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = input().split()
l = int(a[0])
h = int(a[1])
n = int(a[2])
i = 0
while(h>=l):
  if(l%n==0):
    i+=1
  l+=1
print(i)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
l,r,d=map(int, input().split())
num1=l//d
if l%d!=0:
    num1=num1+1
num2=r//d
print((num2-num1)+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:
l, r, d =  map(int, input().split())
ans = 0

multiple1 = r // d
multiple2 = l // d
ans = multiple1 - multiple2
if l % d == 0:
    ans += 1

print(ans)

Submission status: Accepted

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

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

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 = [int(x) for x in input().split()]
count = 0
for i in range(l, r+1):
  if not i%d:
    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:
##a = int(stdin.readline().rstrip())
##b, c = [int(x) for x in stdin.readline().rstrip().split()]
##s = stdin.readline().rstrip()
##a = list(set(b))  重複を削除
##a = list(map(int,[int(x) for x in stdin.readline().rstrip().split()])) a[0, 1, 2, ...]
##a = [[0] * 2 for _ in range(n)]  a[0,0]
##v = [s[i: i+2] for i in range(0, len(s), 2)]
##  s="12345678" を v=["12","34","56","78"] にするイメージ
##s = "".join(list)リストを文字列に変換[""]は区切り文字
##a.sort(key=itemgetter(1))リストをソートできるよ(from operator import itemgetterが必要)
##sort_p = sorted(p) 昇順ソート

# -*- coding: utf-8 -*-
from sys import stdin
from operator import itemgetter
from collections import deque, Counter
import math
import pprint
from functools import reduce
import numpy as np
import random
import bisect
import copy
# stdin = open("sample.txt")


MOD = 1000000007
INF = float('inf')
alpha = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]

def keta(kazu): # 入力されたintを桁ごとに分解，リストで出力
    kazu_str = str(kazu)
    kazu_list = [int(kazu_str[i]) for i in range(0, len(kazu_str))]
    return kazu_list

def gcd(*numbers): # 最小公倍数
    return reduce(math.gcd, numbers)

def combination(m,n): # mCn
    
    if n > m:
        return 'すまん'
    return math.factorial(m) // (math.factorial(m-n) * math.factorial(n))

def pow_k(x,n):  # (x**n)の計算の高速化
    if n == 0:
        return 1
    K = 1
    while n > 1:
        if n % 2 != 0:
            K *= x
        x *= x
        n //= 2
    return K * x

def fact(n): # nの素因数分解の結果を辞書で出力 fuct(24) → {2: 3, 3: 1}
    arr = {}
    temp = n
    for i in range(2,int(n**0.5)+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr[i] = cnt
    if temp != 1:
        arr[temp] = 1
    if arr == {}:
        arr[n] = 1
    return arr


    
def main():
    l, r, d = [int(x) for x in stdin.readline().rstrip().split()]
    print(r//d - (l-1)//d)
main()

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

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

ll = l//d
rr = r//d

ans = rr-ll

if l%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:
def NumberOfMultiples():

    num = list(map(int,input().split()))

    count = 0

    for i in range(num[0], num[1]+1):
        mod = i % num[2]
        
        if mod == 0:
            count = count + 1
    
    print(count)

if __name__ == '__main__':
    NumberOfMultiples()

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

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

Submission status: Accepted

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

left=(-(-l//d))
right=r//d
print(right-left+1)

Submission status: Accepted

Solution code:
def main():
    l,r,d = [int(v) for v in input().split()]

    res = [v for v in range(l, r+1) if v % d == 0]
    print(len(res))

main()

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

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

Submission status: Accepted

Solution code:
from math import ceil

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

print(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, open(0).read().split())

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

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:
Line = [int(s) for s in input().split()]

L,R,d = Line[0],Line[1],Line[2]

ans = 0

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

Submission status: Accepted

Solution code:
mod = 1000000007
eps = 10**-9


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

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

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

Submission status: Accepted

Solution code:
import sys

L,R,d = map(int, sys.stdin.readline().split())
#N = int(sys.stdin.readline())

ans = 0
for i in range(1,int(R/d) + 1):
    if d * i < L:
        continue
    if d * i > R:
        break

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

l, r, d = map(int, sys.stdin.readline().split())

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