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

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush,heapify
import math
from copy import deepcopy
import queue
#import numpy as np
# sympy as syp(素因数分解とか)
Mod = 1000000007
fact = [1, 1]
factinv = [1, 1]
inv = [0, 1] 
for i in range(2, 10**5 + 1):
    fact.append((fact[-1] * i) % Mod)
    inv.append((-inv[Mod % i] * (Mod // i)) % Mod)
    factinv.append((factinv[-1] * inv[-1]) % Mod)
    
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n - r] % p
    
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[y] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)
import string
def main():  #startline-------------------------------------------
    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() #endline===============================================

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

Submission status: Accepted

Solution code:
import math
LI = lambda: list(map(int,input().split()) )
MI = lambda: map(int,input().split())
SI = lambda: input()
II = lambda: int(input())
a,b,d = MI()
x = b//d
if int(a/d) == a/d:
    x -=a//d-1
else:
    x-=a//d
print(x)

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

l,r,d = iim()
lf = l//d
lmod = l%d
rf = r//d

if lf == rf:
    print(1 if lmod == 0 else 0)
else:
    print(rf-lf if lmod !=0 else rf-lf+1)

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
print(B//C-(A-1)//C)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    L, R, d= list(map(int, input().split()))
    count=0
    while L<=R:
        if(L%d==0):
            count+=1
        L += 1
    print(count)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
#pyrival orz
import os
import sys
from io import BytesIO, IOBase

"""
    for _ in range(int(input())):
    n,m=map(int,input().split())
    n=int(input())
    a = [int(x) for x in input().split()]
"""

def main():
    l,r,n=map(int,input().split())
    ans=0
    for i in range(l,r+1):
        ans+=(i%n==0)
    print(ans)
# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
l, r, d = map(int, input().split())
print(r // d - l // d + (l % d == 0))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

'''

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

l, r, d = map(int, input().split())
print(solve(l, r, 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 = cnt + 1

print(cnt)

Submission status: Accepted

Solution code:
#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys;input = sys.stdin.readline
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

from math import ceil
l,r,d = ip()
print(int(r//d-ceil(l/d)+1))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
l,r,d=map(int,input().split())
import numpy as np
ans=0
for ii in np.arange(l,r+1):
  if ii%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=list(map(int,input().split(" ")))
ans = 0
while L<=R:
  if L%d == 0:
    ans += 1
  L += 1
print(ans)

Submission status: Accepted

Solution code:
L,R,D=list(map(int,input().split()))
ans=0
for n in range(L,R+1):
#     print(n)
    if n % 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())

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

       num += 1

print(num)

Submission status: Accepted

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

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

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


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

sr= r //d
sl= (l-1) //d

print(sr-sl)

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:
""" A
    https://atcoder.jp/contests/aising2020/tasks/aising2020_a
"""
import sys
import math
from functools import reduce
from bisect import bisect_left

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

def readInteger():
    return int(readString())

def readStringSet(n):
    return sys.stdin.readline().split(" ")[:n]

def readIntegerSet(n):
    return list(map(int, readStringSet(n)))

def readIntegerMatrix(n, m):
    return reduce(lambda acc, _: acc + [readIntegerSet(m)], range(0, n), [])

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

if __name__ == "__main__":
    _L, _R, _d = readIntegerSet(3)

    print(main(_L, _R, _d))

Submission status: Accepted

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

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


def _ia(): return map(int, sys.stdin.readline().strip().split())


def main():
    l, r, d = _ia()
    return len(list(
        filter(lambda x: l <= x <= r, [i for i in range(d, r+1, d)])))


if __name__ == "__main__":
    print(main())

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

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

Submission status: Accepted

Solution code:
def main():
    L, R, d = map(int, input().split())
    if d == 1:
        return R-L+1
    if L == 1:
        return R//d
    return R//d - (L-1)//d
print(main())
#if main():
#    print('Yes')
#else:
#    print('No')

Submission status: Accepted

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

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

print(answer)

Submission status: Accepted

Solution code:
#%%
L, R, D = [int(i) for i in 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())
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())
n = r //d - (l-1) // d
print(n)

Submission status: Accepted

Solution code:

L, R, d = map(int, input().split())
counter=0
while L <= R:
    if L % d == 0:
        counter += 1
    L += 1
print("{}".format(counter))

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:
# -*- coding: utf-8 -*-
# 標準入力を取得
L, R, d = list(map(int, input().split()))

# 求解処理
ans = 0
for i in range(L, R + 1):
    ans += (i % d == 0)

# 結果出力
print(ans)

Submission status: Accepted

Solution code:
#A
L,R,d = map(int,input().split())
cou = 0

for i in range(1,101):
    if L <= i*d and R>= i*d:
        cou += 1

print(cou)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,n=map(int,input().split())
print(len([x for x in range(a,b+1) if x%n==0]))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
from math import ceil
l, r, d = [int(i) for i in 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())
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())
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 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())
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(R-L+1):
  if (L+i)%d == 0:
    count = count+1
print(count)

Submission status: Accepted

Solution code:

def resolve():
    inp = input()
    L, R, d = tuple(map(int, inp.split(' ')))
    print(R // d - (L-1) // d)
    
resolve()

Submission status: Accepted

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

count=0

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007

#+++++

def main():
	#a = int(input())
	l, r , d= tin()
	#s = input()
	ret = r // d - (l-1) // d
	print(ret)
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

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

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

Submission status: Accepted

Solution code:
# Template 1.0
import sys, re
from decimal import *
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, floor, trunc, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

l,r,d = MAP()

if(l%d==0):

    print(r//d-l//d+1)
else:
    print(r // d - l // d)

Submission status: Accepted

Solution code:
import math
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:
x=input()
x0=x.split()
l=int(x0[0])
r=int(x0[1])
d=int(x0[2])
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())
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-1) // d
b = r // d
print(b-a)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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
from collections import deque
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def Main():
    l,r,d = IL()
    c = 0
    for rep in range(l,r+1):
        if rep%d==0:
            c += 1

    print(c)
    return

if __name__=='__main__':
    Main()

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:
s = input().rstrip().split(' ')

L, R, d = int(s[0]), int(s[1]), int(s[2])
num = 0
for i in range(L, R+1):
  if i % d == 0:
    num += 1
print(num)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def main():
    L, R, d = map(int, input().split())
    l = L//d
    r = R//d
    ans = r-l
    if L%d == 0:
        ans += 1
    print(ans)

if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans=0
i=L//d
while True:
    if L<=d*i and d*i<=R:
      ans+=1
    if R<d*i:
      break
    i+=1




print(ans)

Submission status: Accepted

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

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

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

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

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

rr = r//d
ll = (l-1)//d

print(rr-ll)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())
ans = 0
for i in range(L,R+1,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(1, 10000):
    if l <= i * d <= r:
        ans += 1
    if i * d > r:
        break

print(ans)

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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
data = stdin.readlines()

l = int(data[0].split()[0])
r = int(data[0].split()[1])
d = int(data[0].split()[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())
c = 0
for i in range(1, 200+1):
    if d*i >= L and d*i <= R:
        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 i % d == 0:
        count += 1
print(count)

Submission status: Accepted

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

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

print(out)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
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:
import sys, math, itertools, collections, bisect 
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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