Problem:


Score : 100 points

Problem Statement

How many multiples of d are there among the integers between L and R (inclusive)?

Constraints

All values in input are integers.

1 \leq L \leq R \leq 100

1 \leq d \leq 100

Input

Input is given from Standard Input in the following format:

L R d

Output

Print the number of multiples of d among the integers between L and R (inclusive).

Sample Input 1

5 10 2

Sample Output 1

3

Among the integers between 5 and 10, there are three multiples of 2: 6, 8, and 10.

Sample Input 2

6 20 7

Sample Output 2

2

Among the integers between 6 and 20, there are two multiples of 7: 7 and 14.

Sample Input 3

1 100 1

Sample Output 3

100



Sample input:
5 10 2


Sample output:
3

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(num)

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())

num=0

for i in range(x,y+1):
    if i % z==0:
        num+=1
print(num)

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:
  geta = 1
else:
  geta = 0

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

Submission status: Accepted

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

if __name__ == "__main__":
  main()

Submission status: Accepted

Solution code:
"""
// Author : snape_here - Susanta Mukherjee
     
 """
 
from __future__ import division, print_function
 
import os,sys
from io import BytesIO, IOBase
 
if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
 
def ii(): return int(input())
def fi(): return float(input())
def si(): return input()
def msi(): return map(str,input().split())
def mi(): return map(int,input().split())
def li(): return list(mi())
 
 
def read():
    sys.stdin = open('input.txt', 'r')  
    sys.stdout = open('output.txt', 'w') 
 
def gcd(x, y):
    while y:
        x, y = y, x % y
    return x

mod=1000000007

from math import log,sqrt,factorial,cos,tan,sin,radians,ceil,floor

import bisect

from decimal import *

getcontext().prec = 25

abc="abcdefghijklmnopqrstuvwxyz"

pi=3.141592653589793238


def main():

    l,r,d=mi()

    ans=0 
    for i in range(l,r+1):
        if i%d==0:
            ans+=1 
    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")
 
 
def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()
 
 
if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
 
input = lambda: sys.stdin.readline().rstrip("\r\n")
 
# endregion
 
 
if __name__ == "__main__":
    #read()
    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)

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
# Your code here!

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys 

a, b, d = map(int, input().split())
while a % d != 0: 
	a += 1

while b % d != 0:
	b -= 1

if a > b: 
	print(0)
else:
	print((b - a) // d + 1)

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

Submission status: Accepted

Solution code:
a, b, d = [int(x) for x in input().split()]
multiples = 0
for i in range(a, b + 1):
  multiples += i % d == 0
print(multiples)

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

Submission status: Accepted

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

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
input = sys.stdin.readline

#n = int(input())
#l = list(map(int, input().split()))

'''
a=[]
b=[]
for i in range():
    A, B = map(int, input().split())
    a.append(A)   
    b.append(B)'''

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

if a%c==0:
    print(b//c-a//c+1)
else:
    print(b//c-a//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:
import sys 
input = lambda:sys.stdin.readline().strip()
l,r,d = map(int,input().split())
print(max((r//d)-(l-1)//d,0))

Submission status: Accepted

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

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


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())
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(i) for i in input().split()]

c = 0

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

print(c)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import queue
from math import floor
from decimal import Decimal

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

Submission status: Accepted

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

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

if __name__ == "__main__":
  resolve()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

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

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

print(cnt)

Submission status: Accepted

Solution code:
#A
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 sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return map(int, sys.stdin.readline().split())
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())


def FLIST(n):
    res = [1]
    for i in range(1, n+1):
        res.append(res[i-1]*i % DVSR)
    return res


L, R, d = LI()

res = 0
for i in range(100000):
    v = (L + i)
    if v <= R and v % d == 0:
        res += 1

print(res)

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

Submission status: Accepted

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

cnt=0

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

print(cnt)

Submission status: Accepted

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

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

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

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

main()

Submission status: Accepted

Solution code:
import sys
import itertools
# import numpy as np
import time
import math
import heapq
from collections import defaultdict
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# map(int, input().split())

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

Submission status: Accepted

Solution code:
# aising2020_a.py
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:
import sys

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

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

Submission status: Accepted

Solution code:
# Q1
import sys

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

L, R, d = LI()

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

print(total)

Submission status: Accepted

Solution code:
# coding: utf-8

import math
import re
import numpy as np
import copy

#読み込む
S = input().split(" ")
L = int(S[0])
R = int(S[1])
d = int(S[2])

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 = len([i for i in range(l, r+1) if i%d == 0])
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:
#!/usr/bin/env python3
import sys


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

# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools
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
    print(solve(L, R, d))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    #test()
    main()

Submission status: Accepted

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

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

ans = 0

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

# print('-----output-----')
print(ans)

Submission status: Accepted

Solution code:
import itertools
import decimal
import math
import collections
import sys
#input = sys.stdin.readline
import copy

# S=(input())
# N=int(input())
# N,K=map(int,input().split())
# ListA=list(map(int,input().split()))
# ListA.sort()#reverse=True)

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

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

    print(cnt)



resolve()

Submission status: Accepted

Solution code:
import sys


def main():

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

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

    print(ans)
    return


main()

Submission status: Accepted

Solution code:
l , r, d = [int(x) for x in input().strip().split()]
res = 0

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

print(res)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
Ans = 0
for i in range(A,B+1):
    if i % C == 0:
        Ans += 1
        
print(Ans)

Submission status: Accepted

Solution code:
import sys


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

    print(count)


# 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 = [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 = 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())

cnt=0

for i in range(L,R+1):
    if i % d ==0:
        #print(i)
        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 sys,bisect,string,math,time,functools,random,fractions
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
rep=range
def Golf():n,*t=map(int,open(0).read().split())
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def MI():return map(int,input().split())
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def RA():return map(int,open(0).read().split())
def GI(V,E,ls=None,Directed=False,index=1):
    org_inp=[];g=[[] for i in R(V)]
    FromStdin=True if ls==None else False
    for i in R(E):
        if FromStdin:
            inp=LI()
            org_inp.append(inp)
        else:
            inp=ls[i]
        if len(inp)==2:
            a,b=inp;c=1
        else:
            a,b,c=inp
        if index==1:a-=1;b-=1
        aa=(a,c);bb=(b,c);g[a].append(bb)
        if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1):
    #h,w,g,sg=GGI(h,w,search=['S','G'],replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1) # sample usage
    mp=[boundary]*(w+2);found={}
    for i in R(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
    mp+=[boundary]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def accum(ls):
    rt=[0]
    for i in ls:rt+=[rt[-1]+i]
    return rt
def bit_combination(n,base=2):
    rt=[]
    for tb in R(base**n):s=[tb//(base**bt)%base for bt in R(n)];rt+=[s]
    return rt
def gcd(x,y):
    if y==0:return x
    if x%y==0:return y
    while x%y!=0:x,y=y,x%y
    return y
def YN(x):print(['NO','YES'][x])
def Yn(x):print(['No','Yes'][x])
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)

mo=10**9+7
inf=float('inf')
FourNb=[(-1,0),(1,0),(0,1),(0,-1)];EightNb=[(-1,0),(1,0),(0,1),(0,-1),(1,1),(-1,-1),(1,-1),(-1,1)];compas=dict(zip('WENS',FourNb));cursol=dict(zip('LRUD',FourNb))
l_alp=string.ascii_lowercase
#sys.setrecursionlimit(10**7)
read=sys.stdin.buffer.read;readline=sys.stdin.buffer.readline;input=lambda:sys.stdin.readline().rstrip()

show_flg=False
show_flg=True

ans=0

l,r,d=LI()

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:
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    L,R,d=MI()
    
    cnt=0
    for i in range(L,R+1):
        if i%d==0:
            cnt+=1
            
    print(cnt)

main()

Submission status: Accepted

Solution code:
# A

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

count = 0

for i in range(r-l+1):
    if (l + 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:
# coding: utf-8
# Your code here!
import sys
read = sys.stdin.read
readline = sys.stdin.readline

#n,k,*a = map(int,read().split())
l,r,d = map(int,readline().split())

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

Submission status: Accepted

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

s = [i for i in range(L,R+1)]

ans = 0

for i in s:
    if i % d == 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:

#!/usr/bin/python
# -*- coding: utf-8 -*-

import numpy as np

def int_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(map(int,input().split())))
    return np.array(x)

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

ans = 0

for i in range(0,1000):
    if d*i >= L and d*i <= R:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

L, R, d = inm()


def solve():
    r = R // d
    l = (L - 1) // d
    return r - l


print(solve())

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout

int_in = lambda: int(stdin.readline())
arr_in = lambda: [int(x) for x in stdin.readline().split()]
mat_in = lambda rows: [arr_in() for _ in range(rows)]
str_in = lambda: stdin.readline().strip()
out = lambda o: stdout.write("{}\n".format(o))
arr_out = lambda o: out(" ".join(map(str, o)))
bool_out = lambda o: out("YES" if o else "NO")
tests = lambda: range(1, int_in() + 1)
case_out = lambda i, o: out("Case #{}: {}".format(i, o))


if __name__ == "__main__":
    l, r, d = arr_in()
    result = 0
    for i in range(l, r+1):
        if i % d == 0:
            result += 1
    out(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())
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(d,101,d):
    if L <= i <= R:
        ans += 1
print(ans)

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:
#<エイジングプロコン2020>
#<A>
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:
#!/usr/bin/env python3
import sys
import numpy as np


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

    print(ans)
    return


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

Submission status: Accepted

Solution code:
l,r,n = list(map(int,input().split()))
x = l//n
y = r//n
ans = y-x
if l%n==0:
    ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
from itertools import accumulate
def main():
    l, r, d = map(int, input().split())
    res = 0
    for i1 in range(l, r + 1):
        res += i1 % d == 0

    print(res)


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