Problem:


Score : 100 points

Problem Statement

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

Constraints

All values in input are integers.

1 \leq L \leq R \leq 100

1 \leq d \leq 100

Input

Input is given from Standard Input in the following format:

L R d

Output

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

Sample Input 1

5 10 2

Sample Output 1

3

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

Sample Input 2

6 20 7

Sample Output 2

2

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

Sample Input 3

1 100 1

Sample Output 3

100



Sample input:
5 10 2


Sample output:
3

Submission status: Accepted

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

# 実行環境(0:vscode, 1:atcoder)
MODE = 1

# 入力の次元
DIMENSION = 1

# int型に変換
INT_TYPE = 1

if not (MODE):
    with open("input.txt", "r") as f:
        s = f.read()
else:
    s = sys.stdin.read()

if DIMENSION == 0:
    if INT_TYPE == 1:
        s = int(s)
elif DIMENSION == 1:
    if INT_TYPE == 0:
        s = s.split()
    elif INT_TYPE == 1:
        s = [int(x) for x in s.split()]
elif DIMENSION == 2:
    if INT_TYPE == 0:
        s = [x.split() for x in s.splitlines()]
    elif INT_TYPE == 1:
        s = [[int(y) for y in x.split()] for x in s.splitlines()]

L, R, d = s
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, 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())
    count = 0

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

    print(count)


if __name__ == "__main__":
    main()

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:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys


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


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)


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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

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


def readline_from_stdin() -> str:
    return stdin.readline().rstrip


if __name__ == '__main__':
    L, R, d = input().split()
    L, R, d = int(L), int(R), int(d)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    L, R, d = list(map(int, input().split()))
    cnt = 0
    for n in range(L, R + 1):
        if n % d == 0:
            cnt += 1
    return cnt

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

Submission status: Accepted

Solution code:
from sys import stdin

def main():
    h, w, k = [int(x) for x in stdin.readline().rstrip().split()]
    cnt = 0
    for i in range(h,w+1):
        if i % k == 0:
            cnt += 1
    print(cnt)
    

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
l,r,d = map(int, stdin.readline().rstrip().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())
k = L//d
n = R//d
if L%d==0:
    print(n-k+1)
else:
    print(n-k)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

import io
import sys
import math

def format_multi_line_answer(lst):
    ans = ""
    ans += f"{len(lst)}\n"  # Line count
    for y in lst:
        ans += f"{y}\n"
    return ans

def solve(l,r,d):
    # implement process
    s = 0
    for i in range(l,r+1):
        if i%d==0: s+=1
    return s


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

    # process
    ans = str( solve( l,r,d) )
    
    # output
    print(ans)
    return ans
        
### DEBUG I/O ###
_DEB = 0   # 1:ON / 0:OFF

_INPUT = """\
1 100 1
"""
_EXPECTED = """\
100

"""

def logd(str):
    """usage:
    if _DEB: logd(f"{str}")
    """
    if _DEB: print(f"[deb] {str}")

### MAIN ###
if __name__ == "__main__":
    if _DEB:
        sys.stdin = io.StringIO(_INPUT)
        print("!! Debug Mode !!")

    ans = main()

    if _DEB:
        print()
        if _EXPECTED.strip() == ans.strip(): print("!! Success !!")
        else: print(f"!! Failed... !!\nANSWER:   {ans}\nExpected: {_EXPECTED}")

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

Solution code:
a,b,c=[int(x) for x in input().split()]
print(b//c-(a-1)//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())
out = sum([True for i in range(L, R+1) if i%d==0])
print(out)

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

Solution code:
# vim: fileencoding=utf-8


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# import numpy as np
# sys.setrecursionlimit(int(pow(10,6)))
# sys.stdout = open("out.txt", "w")
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]

try:
    sys.stdin = open("input.txt", "r")
except:
    pass


# @lru_cache(None)
l,r,d=L()
ans=(r//d)-(l//d)+(l%d==0)
print(ans)

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split(' '))
i = a
cnt = 0
while i <= b:
    if i % c == 0:
        cnt += 1
    i += 1

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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//d
lll=l%d
if lll==0:
    print(rr-ll+1)
else:
    print(rr-ll)

Submission status: Accepted

Solution code:
b = list(map(int,input().split()))
ans = 0

for i in range(b[0], b[1] + 1):
    if i % b[2] == 0:
        ans += 1
                
print(str(ans))

Submission status: Accepted

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

if __name__ == "__main__":
    resolve()

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

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=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:
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import reduce
import math
import itertools
import heapq
#import numpy as np
import bisect
import sys
#import sympy
sys.setrecursionlimit(10**6)


def bfs(s, n, node):
    # 頂点が探索済みかどうかのチェック配列
    check = [False for _ in range(n)]
    check[s] = True
    # 次見る頂点を格納するキュー
    queue = deque([s])
    visited_num = 1

    # 問題固有の配列
    #color_check=[[True for _ in range(l)] for _ in range(n)]
    color = [-1 for _ in range(n)]
    color[s] = 0

    while visited_num < n:
        # グラフが全連結ではない場合
        if len(queue) == 0:
            # 空配列を返す
            # 現状までの計算済み配列を返してもいいと思う
            return color

        now_vertex = queue.popleft()
        # インデックスがない場合は
        for next_vertex in node[now_vertex]:

            if check[next_vertex] == True:
                continue

            queue.append(next_vertex)
            check[next_vertex] = True

            # 問題固有の計算
            color[next_vertex] = color[now_vertex]+1
            visited_num += 1

    return color


mod = 10**9+7
# n=int(input())
# n,m=list(map(int,input().split()))
# a=list(map(int,input().split()))
def ceil(x, y): return (x+y-1)//y
def input_list(): return list(map(int, input().split()))


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

r = 0
for i in range(L, R+1):
    if i >= d and 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:
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:
x,y,z=map(int,input().split())
print((y//z)-(x-1)//z)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


def main():
    L, R, d = [int(i) for i in input().strip().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())
ans=0
i=L
while i<=R:
    ans+=i%D==0
    i+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

L, R, d = map(int, sys.stdin.readline().strip().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())
ref = [i for i in range(L, R+1)]
cnt = 0
for i in ref:
  if i % d == 0:
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
A,B,C = list(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:
#!/usr/bin/env python3

import sys

input = iter(sys.stdin.read().splitlines()).__next__

sys.setrecursionlimit(10000)

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

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

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

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):
    cnt += i%d == 0

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

Submission status: Accepted

Solution code:
# n = int(input())

# c = list(map(int, input().split()))
# s = [list(map(int, list(input()))) for i in range(10)]
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())
res = 0
for i in range(l, r+1):
  if i%d == 0:
    res += 1
print(res)

Submission status: Accepted

Solution code:
def resolve():
    import sys
    input = sys.stdin.readline
    # 整数 1 つ
    # n = int(input())
    # 整数複数個
    l, r, d = map(int, input().split())
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    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

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

L, R, d = map(int, read().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 python3

import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

L, R, d = map(int, readline().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 = [int(e) for e in input().split()]

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    L, R, d = [int(i) for i in input().split()]
    print(R // d - (L - 1) // d)


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:
import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    L, R, d = map(int, readline().split())
    ans = R//d - L//d
    if L%d==0:
        ans += 1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys


def resolve():
    readline = sys.stdin.readline

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
l,r,d=[int(x) for x 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:
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:
import sys
import numpy as np
import math  # gcdもあるよ
from collections import deque
from collections import defaultdict
from copy import deepcopy
from itertools import accumulate #リストを与えると累積和を返す
def input(): return sys.stdin.readline().rstrip()
from functools import lru_cache #メモ化

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

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

count=0
for i in range(a,b+1):
  if i%c==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)



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

Submission status: Accepted

Solution code:
# A Number of Multiples

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

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

Submission status: Accepted

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

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

  print(sum)

if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
#n = int(input())
#
l,r,d = map(int,input().split())
#a = list(map(int,input().split()))
#mod = pow(10,9) + 7
sum =0
for i in range(l,r+1):
    if i % d ==  0:
        sum += 1
print(sum)
'''
a = []
for i in range(n):
    a.append(list(map(int,input().split())))
print(a)
'''

Submission status: Accepted

Solution code:
import sys

def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))
def RN(N): return [input().strip() for i in range(N)]


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 = [int(i) for i in input().split()]
def go(x):
    return x//d

print(go(r) - go(l-1))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
count=0
l, r, d= map(int, input().split(' '))
for x in range(l, r+1):
	if x%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:
#-*-coding:utf-8-*-

import sys

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000000)
import math
from math import gcd
def lcm(a, b): return a * b // gcd(a, b)
from itertools import count, permutations, chain, product
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok

def get_inv(n, modp):
    return pow(n, modp-2, modp)

def factorials_list(n, modp):    # 10**6
    fs = [1]
    for i in range(1, n+1):
        fs.append(fs[-1] * i % modp)
    return fs

def invs_list(n, fs, modp):     # 10**6
    invs = [get_inv(fs[-1], modp)]
    for i in range(n, 1-1, -1):
        invs.append(invs[-1] * i % modp)
    invs.reverse()
    return invs

def comb(n, k, modp):
    num = 1
    for i in range(n, n-k, -1):
        num = num * i % modp
    den = 1
    for i in range(2, k+1):
        den = den * i % modp
    return num * get_inv(den, modp) % modp

def comb_from_list(n, k, modp, fs, invs):   
    return fs[n] * invs[n-k] * invs[k] % modp

#

class UnionFindEx:
    def __init__(self, size):
        #正なら根の番号、負ならグループサイズ
        self.roots = [-1] * size
    def getRootID(self, i):
        r = self.roots[i]
        if r < 0:   #負なら根
            return i
        else:
            r = self.getRootID(r)
            self.roots[i] = r
            return r
    def getGroupSize(self, i):
        return -self.roots[self.getRootID(i)]
    def connect(self, i, j):
        r1, r2 = self.getRootID(i), self.getRootID(j)
        if r1 == r2:
            return False
        if self.getGroupSize(r1) < self.getGroupSize(r2):
            r1, r2 = r2, r1
        self.roots[r1] += self.roots[r2]    #サイズ更新
        self.roots[r2] = r1
        return True

Yes = 'Yes'
No = 'No'


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









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

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

print(cnt)