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

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
    L, R, d = MI()
    ans = 0
    for i in range(L, R+1):
        if i%d == 0:
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(a-b)

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

Submission status: Accepted

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

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

def input():
    return sys.stdin.readline()[:-1]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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):
    #print(i)
    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())
res = 0

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

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:
import bisect
import sys
import math
from collections import deque
from heapq import heappush, heappop

def sRaw():
    return input().rstrip("\r")


def iRaw():
    return int(input())


def ssRaw():
    return input().split()


def isRaw():
    return list(map(int, ssRaw()))


INF = 1 << 29

DIV = (10**9) + 7
#DIV = 998244353

def mod_inv_prime(a, mod=DIV):
    return pow(a, mod-2, mod)


def mod_inv(a, b):
    r = a
    w = b
    u = 1
    v = 0
    while w != 0:
        t = r//w
        r -= t*w
        r, w = w, r
        u -= t*v
        u, v = v, u
    return (u % b+b) % b


def CONV_TBL(max, mod=DIV):
    fac, finv, inv = [0]*max, [0]*max, [0]*max
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2, max):
        fac[i] = fac[i-1]*i % mod
        inv[i] = mod - inv[mod % i] * (mod//i) % mod
        finv[i] = finv[i-1]*inv[i] % mod

    class CONV:
        def __init__(self):
            self.fac = fac
            self.finv = finv
            pass

        def ncr(self, n, k):
            if(n < k):
                return 0
            if(n < 0 or k < 0):
                return 0
            return fac[n]*(finv[k]*finv[n-k] % DIV) % DIV

    return CONV()


def cumsum(As):
    s = 0
    for a in As:
        s += a
        yield s


sys.setrecursionlimit(200005)


def dijkstra(G,start=0):
    heap = []
    cost = [INF]*len(G)
    heappush(heap,(0,start))
    while len(heap)!=0:
        c,n = heappop(heap)
        if cost[n] !=INF:
            continue
        cost[n]=c
        for e in G[n]:
            ec,v = e
            if cost[v]!=INF:
                continue
            heappush(heap,(ec+c,v))
    return cost


def main():
    L,R,d = isRaw()

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


main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import gcd

from math import factorial as f

from math import ceil, floor, sqrt
import math

import bisect
import re
import heapq

from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

yes = "Yes"
no = "No"


def main():
    l, r, d = mi()
    cnt = 0
    tmp = d
    while tmp <= r:
        if tmp <= r and tmp >= l:
            cnt += 1
        tmp += d
    print(cnt)


main()

Submission status: Accepted

Solution code:
# input()
# int(input())
# map(int, input().split())
# list(map(int, input().split()))
# list(map(int, list(input()))) # スペースがない数字リストを読み込み
import math
import fractions
import sys
import bisect
import heapq  # 優先度付きキュー(最小値取り出し)
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


# a^n
def power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod


# n*(n-1)*...*(l+1)*l
def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a

# Union Find
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# 約数生成
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors


inf = 10 ** 18
mod = 10 ** 9 + 7

l,r,d = lr()
mind = l//d
if l%d == 0:
    mind-=1
maxd = r//d
print(maxd-mind)

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
    return ans 

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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)

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

count = 0

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

print(count)

Submission status: Accepted

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

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

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

print(out)

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


def II(): return int(sys.stdin.readline())


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


def LI(): return list(map(int, sys.stdin.readline().split()))


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


# oj t -c "pypy3 main.py"
# acc s main.py -- --guess-python-interpreter pypy
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:
def main():
    L, R, d = map(int, input().split())
    c = 0
    for i in range(L, R + 1):
        if i % d == 0:
            c += 1

    return c

print(main())

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
#N, K = (int(i) for i in input().split())
#B = [int(x) for x in input().split()]
#A = [[int(i) for i in input().split()] for i in range(N)]
L, R, d = (int(i) for i in input().split())
count = 0
for i in range(L, R+1):
    if i%d == 0:
        count += 1

print(count)

Submission status: Accepted

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

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

    print(cnt)


submit()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 9)
# input = sys.stdin.readline    ####
def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')
# from math import ceil, floor, log2
# from collections import deque
# from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product, permutations
# from heapq import heapify, heappop, heappush
# import numpy as np    # cumsum
# from bisect import bisect_left, bisect_right

def solve():
    L, R, D = MI()

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

if __name__ == '__main__':
    solve()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    L,R,d=mi()
    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:
a,b,n=map(int,input().split())
print(b//n-a//n+(a%n==0))

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

resolve()

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
# from pprint import pprint
# import math
# import collections

# n = int(input())
l, r, d = map(int, input().split(' '))
# a = list(map(int, input().split(' ')))
# a = []
# for i in range(n):
#     a.append(int(input()))
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())

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

Submission status: Accepted

Solution code:

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

print(ans)

Submission status: Accepted

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


def read():
    L, R, D = map(int, input().strip().split())
    return L, R, D


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


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))

Submission status: Accepted

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

Submission status: Accepted

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

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 k in range( l, r + 1 ):
    if k % 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())
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(' '))

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:
import sys
import math
import heapq
from collections import defaultdict, deque
from decimal import *
def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))

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

Submission status: Accepted

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

    print(ans)

resolve()

Submission status: Accepted

Solution code:
import sys, io, os, re
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from pprint import pprint
from math import sin, cos, pi, radians, sqrt, floor, ceil
from copy import copy, deepcopy
from collections import deque
from fractions import gcd
from functools import reduce
from itertools import groupby
from heapq import heapify, heappush, heappop

# sys.setrecursionlimit(5000)

n1 = lambda: int(sys.stdin.readline().strip())
nn = lambda: list(map(int, sys.stdin.readline().strip().split()))
f1 = lambda: float(sys.stdin.readline().strip())
fn = lambda: list(map(float, sys.stdin.readline().strip().split()))
s1 = lambda: sys.stdin.readline().strip()
sn = lambda: list(sys.stdin.readline().strip().split())
nl = lambda n: [n1() for _ in range(n)]
fl = lambda n: [f1() for _ in range(n)]
sl = lambda n: [s1() for _ in range(n)]
nm = lambda n: [nn() for _ in range(n)]
fm = lambda n: [fn() for _ in range(n)]
sm = lambda n: [sn() for _ in range(n)]

def array1(n, d=0): return [d] * n
def array2(n, m, d=0): return [[d] * m for x in range(n)]
def array3(n, m, l, d=0): return [[[d] * l for y in xrange(m)] for x in xrange(n)]
def linc(A, d=1): return map(lambda x: x + d, A)
def ldec(A, d=1): return map(lambda x: x - d, A)

L, R, d = nn()

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


def solve(*args: str) -> str:
    l, r, d = map(int, args[0].split())
    count = 0
    for i in range(l, r+1):
        if i % d == 0:
            count += 1
    return str(count)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Submission status: Accepted

Solution code:
#Problem A
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
import bisect
import itertools
import collections
import fractions
import heapq
import math
from operator import mul
from functools import reduce
from functools import lru_cache


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7

    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__':
    solve()

Submission status: Accepted

Solution code:
#: Author - Soumya Saurav
import sys,io,os,time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline

########################################




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

Submission status: Accepted

Solution code:
L, R, d = 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:
count=0
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:
import sys
import copy
input = sys.stdin.readline


X,Y,D=map(int,input().split())
count=0
for i in range(X,Y+1):
    if i%D==0:
        count+=1
print(count)

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:
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:
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())
ans = 0
for i in range(L, R+1):
    ans += 1 if i % d == 0 else 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())
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 statistics
import itertools
from collections import deque

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

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

#N=int(input())
#S=input()
L,R,d = map(int, input().split())
#A,B = input().split()
#List = [int(input()) for i in range(5)]
ans=0
i=L
while i<=R:
    if i%d==0:
        ans+=1
    i+=1
    
print(ans)

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

# In[5]:


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


# In[6]:


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


# In[ ]:

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:
import sys, bisect, math, itertools, heapq, collections
from operator import itemgetter
# a.sort(key=itemgetter(i)) # i番目要素でsort
from functools import lru_cache
# @lru_cache(maxsize=None)
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7


def inp():
    '''
    一つの整数
    '''
    return int(input())


def inpl():
    '''
    一行に複数の整数
    '''
    return list(map(int, input().split()))


def str_inp():
    '''
    文字列をリストとして読み込む
    '''
    return list(input()[:-1])


l, r, d = inpl()
ans = r // d - (l - 1) // d
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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)
    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())
count = 0
for i in range(L,R+1):
    if i % d == 0:
        count+=1
print(count)

Submission status: Accepted

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

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

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
l,r,d= 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 -*-
import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub


import sys
# sys.setrecursionlimit(10**6)
# buff_readline = sys.stdin.buffer.readline
buff_readline = sys.stdin.readline
readline = sys.stdin.readline

INF = 2**62-1


def read_int():
    return int(buff_readline())


def read_int_n():
    return list(map(int, buff_readline().split()))


def read_float():
    return float(buff_readline())


def read_float_n():
    return list(map(float, buff_readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()

def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(L, R, D):
    ans = 0
    for i in range(L, R+1):
        if i % D == 0:
            ans += 1
    return ans


def main():
    L, R, D = read_int_n()
    print(slv(L, R, D))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#n = int(input())
l,r,d = [int(i) for i in input().split()]

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

print(count)

Submission status: Accepted

Solution code:

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

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

  print(ans)

main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)

#a = int(input())
#b = list(map(int, input().split()))
l, r, d = map(int, input().split())
#s = input()
#s,t = input().split()
#a = [int(input()) for _ in range(n)]
#
#readline = sys.stdin.readline
#n,m = [int(i) for i in readline().split()]
#ab = [[int(i) for i in readline().split()] for _ in range(n)]

ans = 0

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

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

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

ans = 0

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect

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

if __name__ == "__main__":
    main()

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

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

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

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