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

cnt=0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 
import sys

from sys import stdin
input = lambda: stdin.readline().rstrip()


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

Submission status: Accepted

Solution code:
L, R, d = tuple(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 resolve():
    import sys
    sys.setrecursionlimit(10 ** 6)  # 再帰関数の再帰の深さを設定
    to_index = lambda x: int(x) - 1  # 入力した数字に1を引いたものを返す
    print_list_in_2D = lambda x: print(*x, sep="\n")  # リストの要素を改行を挟んで表示する関数

    # 入力を整数に変換して受け取る
    def input_int():
        return int(input())

    def map_int_input():
        return map(int, input())

    MII = map_int_input

    def MII_split():
        return map(int, input().split())

    def MII_to_index():
        return map(to_index, input())

    def MII_split_to_index():
        return map(to_index, input().split())

    # 入力全てを整数に変換したものの配列を受け取る
    def list_int_inputs():
        return list(map(int, input()))

    LII = list_int_inputs

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

    # 2次元リスト化
    def LII_2D(rows_number):
        return [LII() for _ in range(rows_number)]

    def LII_split_2D(rows_number):
        return [LII_split() for _ in range(rows_number)]

    L, R, d = MII_split()
    ans = 0
    # print(list(range(L, R)))
    for i in range(L, R + 1):

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

    # amari = (R - L) % d
    # ans = (R - L) / d
    # if L % d + amari >= d or d == 1:
    #     ans += 1

    print(int(ans))
resolve()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

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

print(ans)

Submission status: Accepted

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

a = 1
cnt = 0
while 1:
    s = d*a
    if (L<=s)and(R>=s):
        cnt += 1
    elif R<s:
        break
    a += 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:
import math
from collections import *
import sys
inp=sys.stdin.readline

def linp(x):
    return list(map(int,x.split()))
def minp(x):
    return map(int,x.split())
    
def main():
    l,r,d = minp(inp())
    rem = l%d
    if rem!=0:
        l += d-rem
    if l>r:
        print(0)
    else:
        c=0
        while l<=r:
            c+=1
            l+=d
        print(c)



if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
ans = round(r//d) - round(l//d)
if r%d ==0 and l%d ==0:
  print(ans+1)
else:
  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=0
for i in range(l,r+1):
    if i%d ==0:
        count += 1
print(count)

Submission status: Accepted

Solution code:
# Coding is about expressing your feeling, and
# there is always a better way to express your feeling_feelme
import sys
import math
# sys.stdin=open('input.txt','r')
# sys.stdout=open('output2.txt','w')
from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=int(1e9 + 7)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
x = 0
y = 0
for i in range(b):
    x = c * (i + 1)
    if x >= a:
        if x <= b:
            y = y + 1
print(y)

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:
L,R,d=(int(x) for x 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:
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()]

count = 0

for x in range(L,R+1):
    if x % 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:
a = list(map(int,input().split()))
answer=int(a[1]/a[2])-int(a[0]/a[2])
if a[0]%a[2]==0:
    answer=answer+1
print(answer)

Submission status: Accepted

Solution code:
numbers = input()
onenum = numbers.split()
onenum[0] = int(onenum[0])
onenum[1] = int(onenum[1])
onenum[2] = int(onenum[2])

answer = 0
i = onenum[0]
while i <= onenum[1]:
    if i % onenum[2] == 0:
        answer += 1
    i += 1

print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
input_number	= list(map(int, input().split()))
answer			= 0

for i in range(input_number[0], input_number[1]+1):
  if (i % input_number[2]) == 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:
import math as ma
l,r,d = (int(x) for x in input().split())
L = ma.ceil (l/d)
R = ma.floor (r/d)
print (R-L+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:
L,R,d=map(int,input().split())
cnt=int(0)
for i in range(101):
    if i%d==0 and L<=i<=R:
        cnt+=1 
print(cnt)

Submission status: Accepted

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

cnt = 0

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[2]:


L,R,D = input().split()


# In[3]:


count= 0


# In[4]:


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


# In[ ]:

Submission status: Accepted

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

ans = 0

min = L // d
max = R // d

if(L % d == 0):
    ans = max - min + 1
else:
    ans = max - min

print(ans)

Submission status: Accepted

Solution code:
import collections
import sys
a,b,c= map(int,input().split())
if a == b and a%c==0:
	print(1)
	sys.exit()
elif a == b and a%c!=0:
	print(0)
	sys.exit()
if c!=1 :
    print(b//c-a//c)
    sys.exit()
elif c == 1:
    print(b-c+1)
    sys.exit()

Submission status: Accepted

Solution code:
import math

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

if l % d == 0:
  if r % d == 0:
    print(math.floor(r/d) - math.floor(l/d) + 1)
  else:
    print(math.floor(r/d) - math.floor(l/d) + 1)
else:
  if r % d == 0:
    print(math.floor(r/d) - math.floor(l/d))
  else:
    print(math.floor(r/d) - math.floor(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:
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
l,r,d=map(int,stdin.readline().split())
ans=r//d -l//d
if(l%d==0):
    ans+=1
print(ans)

Submission status: Accepted

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

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 = []

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

Submission status: Accepted

Solution code:
#=input()
#=int(input())
a,b,d=map(int,input().split())
#=map(str,input().split())
#=list(map(int,input().split()))
t=(b-a)//d
if a % d == 0 or b % d == 0:
    t=t+1
print(t)

Submission status: Accepted

Solution code:
x,y,z = map(int, input().split())
if x%z == 0 and y%z == 0:
    print((y//z)-(x//z)+1)
else:
    print(y//z-x//z)

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:
def main():
  from sys import stdin
  l,r,d = map(int, stdin.readline().split())
  print(r//d - l//d) if l%d != 0 else print(r//d - l//d + 1)
main()

Submission status: Accepted

Solution code:

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

while 1:
    if R < cou*d:
        break


    if L<=cou*d:
        count+=1
    cou+=1

print(count)

Submission status: Accepted

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

a = l
ans = 0
while a <= r:
    if a % d == 0:
        ans += 1
    a += 1
print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

while bai <= r:
    ans += 1
    i += 1
    bai = d*i
print(ans)

Submission status: Accepted

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

    c = 0
    for i in range(L, R+1):
        if(i % d == 0):
            c += 1
    print(c)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = 0

t = math.ceil(L / d)
t2 = t * d

while t2 <= R:
    ans = ans + 1
    t2 = t2 + d

print(ans)

Submission status: Accepted

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

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


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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = [int(s) for s in input().split()]

print(int(l[1] / l[2]) - int((l[0]-1) / l[2]))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(R//d-L//d + (L%d==0))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
nums = [int(e) for e in input().split()]

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

Submission status: Accepted

Solution code:

l, r, d = (int(x) for x in input().split())

tmp1 = r//d
tmp2 = l//d

if(l%d == 0 and r%d ==0):
    print(tmp1 - tmp2 + 1)
else:
    print(tmp1 - tmp2)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())
cnt = 0
i = 0
while True:
    if i*d > r:
        break
    if l <= i*d <= 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())
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())
rr=r//d
ll=(l-1)//d
print(rr-ll)

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


x = [i for i in range(l, r+1)]

cnt = 0
for j in x:
    if j%d == 0:
        cnt += 1

print(cnt)

Submission status: Accepted

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

l = list(range(L,R+1))
counter = 0

for i in range(len(l)):
    if l[i] % d == 0:
        counter += 1

print(counter)

Submission status: Accepted

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

dlist = [i*d for i in range(101) ]

ans = 0

for a in dlist:
  if l<=a and a<=r:
    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:
"""
    こんにちは。これはクシャルです
    
    Author : thekushalghosh (クシャル)
    Team   : CodeDiggers
 
    I prefer Python language over the C++ language :p :D
        
    Visit my website : thekushalghosh.github.io
"""
import sys,math,cmath,time,itertools
start_time = time.time()
##########################################################################
################# ---- THE ACTUAL CODE STARTS BELOW ---- #################

def solve():
    l,r,d = invr()
    c = 0
    for i in range(l,r + 1):
        if i % d == 0:
            c = c + 1
    print(c)
    
################## ---- THE ACTUAL CODE ENDS ABOVE ---- ##################
##########################################################################
 
def main():
    global tt
    if not ONLINE_JUDGE:
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")
    t = 1
    for tt in range(t):
        solve()
    if not ONLINE_JUDGE:
        print("Time Elapsed :",time.time() - start_time,"seconds")
        sys.stdout.close()
    
#---------------------- USER DEFINED INPUT FUNCTIONS ----------------------#
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    return(input().strip())
def invr():
    return(map(int,input().split()))
 
#------------------ USER DEFINED PROGRAMMING FUNCTIONS ------------------#
def counter(a):
    q = [0] * max(a)
    for i in range(len(a)):
        q[a[i] - 1] = q[a[i] - 1] + 1
    return(q)

def counter_elements(a):
    q = dict()
    for i in range(len(a)):
        if a[i] not in q:
            q[a[i]] = 0
        q[a[i]] = q[a[i]] + 1
    return(q)

def string_counter(a):
    q = [0] * 26
    for i in range(len(a)):
        q[ord(a[i]) - 97] = q[ord(a[i]) - 97],1
    return(q)
 
def factors(n):
    q = []
    for i in range(1,int(n ** 0.5) + 1):
        if n % i == 0: q.append(i); q.append(n // i)
    return(list(sorted(list(set(q)))))
 
def prime_factors(n):
    q = []
    while n % 2 == 0: q.append(2); n = n // 2
    for i in range(3,int(n ** 0.5) + 1,2):
        while n % i == 0: q.append(i); n = n // i
    if n > 2: q.append(n)
    return(list(sorted(q)))

def transpose(a):
    n,m = len(a),len(a[0])
    b = [[0] * n for i in range(m)]
    for i in range(m): 
        for j in range(n): 
            b[i][j] = a[j][i]
    return(b)

#-----------------------------------------------------------------------#
        
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
    input = sys.stdin.readline
    
main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=input()
a=[int(i) for i in a.split()]

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

print(ans)

Submission status: Accepted

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

ans_r = R // d
ans_l = L // d
ans = ans_r - ans_l

if ((L % d) == 0):
    ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
[l,r,n]=list(map(int, input().split()))
res=0
low=(l//n)
high=(r//n)
low=(1 if low<0 else low)
for i in range(low ,high+1):
  curr=i*n
  if curr<=r and curr>=l:
    res+=1
print(res)

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

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
L, R, d = l[0], l[1], l[2]

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

Submission status: Accepted

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

main()

Submission status: Accepted

Solution code:
import sys

if __name__ == "__main__":
    L, R, d = list(map(lambda x: int(x), sys.stdin.readline().split()))
    ans = sum([1 if i % d == 0 else 0 for i in range(L, R+1)])
        
    print(ans)

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 = list(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:
#AIsing2020 a

import sys,math,collections,itertools
input = sys.stdin.readline

L,R,d = list(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


if(__name__ == "__main__"):

    L, R, d = map(int, input().strip().split() )
    N_L = (L-1)//d
    N_R = R//d
    print(N_R-N_L)

Submission status: Accepted

Solution code:
def main():
    l, r, d = map(int, input().split())
    n = 100//d
    count = 0
    for i in range(n):
        i_ = i + 1
        a = d * i_
        if a>=l and a<=r:
            count += 1
    
    print(count)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# 解答
def abc173_a(lines):
    L, R, d = map(int, lines[0].split(' '))
    answer = 0
    for i in range(L, R+1):
        if i % d == 0:
            answer += 1
    return [answer]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['5 10 2']
        lines_export = [3]
    elif pattern == 2:
        lines_input = ['6 20 7']
        lines_export = [2]
    elif pattern == 3:
        lines_input = ['1 100 1']
        lines_export = [100]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = abc173_a(lines_input)

    for line_result in lines_result:
        print(line_result)

    if mode > 0:
        print(f'lines_input=[{lines_input}]')
        print(f'lines_export=[{lines_export}]')
        print(f'lines_result=[{lines_result}]')
        if lines_result == lines_export:
            print('OK')
        else:
            print('NG')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import itertools as p
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())
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!=0:
	l = l + (d-l%d)
if r-l == 0:
	if (l%d==0):
		print(1)
	else:
		print(0)
elif l < r:
	print(r//d-l//d+1)
else:
	print(0)

Submission status: Accepted

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

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

s = b - a

print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,W,K=map(int,input().split())
a=int((H-1)/K)
b=int(W/K)
ans=b-a
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=list(map(int,input().split()))
out=0
minn=R+1
for i in range(L,R+1):
    if i%d==0:
        minn=i
        break
for i in range(minn,R+1,d):
    out+=1
print(out)

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

Submission status: Accepted

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

print(Main(L, R, D))

Submission status: Accepted

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

ans = 0

temp = d

while temp <= 100:
    if (l <= temp) and (temp <= r):
        ans += 1

    temp += d

print(ans)

Submission status: Accepted

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

    print(total)
    

main()

Submission status: Accepted

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

import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        for line in sys.stdin:
            lines.append(line.strip())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (l, r, d) = [int(e) for e in lines[0].split(' ')]

    return (l, r, d)


def solve(l, r, d):

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

    return cnt
    


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Accepted

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

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

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

print(s)

Submission status: Accepted

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

count = 0
for x in range(L, R+1):
    if x % m == 0:
        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:
import math
a,b,wari = map(int, input().split(" "))
if a % wari == 0 and b % wari == 0:
  print(b //wari - a // wari + 1)
else:
  print(b //wari - a // wari)

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys 

readline = sys.stdin.readline

LRd = readline().split()
L = int(LRd[0])
R = int(LRd[1])
d = int(LRd[2])

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())
total = 0
i = 1
while True:
  num = d*i
  if num >= l:
    break
  else:
    i+=1

while True:
  num = d*i
  if num <= r:
    total += 1
    i+=1
  else:
    break
print(total)

Submission status: Accepted

Solution code:
#coding: UTF-8
L, R, d = map(int, input().split())

cnt = 0

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