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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def getInts():
    return [ int(x) for x in input().split() ]

[L,R,d] = getInts()

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

Submission status: Accepted

Solution code:
inp = list(map(int,input().split()))
l=inp[0]
r=inp[1]
d=inp[2]
if l%d!=0:
    l=l-(l%d)+d
r-=(r%d)
if l<=r:
    print (((r-l)//d)+1)
else:
    print (0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 別変数の整数複数個
L, R, d = [int(x) for x in input().strip().split(" ")]

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

Submission status: Accepted

Solution code:
A = input().split()
L = int(A[0])
R = int(A[1])
d = int(A[2])
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(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())  

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

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
import math
import time
#import numpy as np
import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools



sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in range(H)]
#INF = V * 10001
#A = [int(i) for i in input().split()]
#AB = [list(map(int, input().split())) for _ in range(K)]

L, R, d= map(int,input().split())
ans = 0
s = d
while True:
    if(L <= s <= R):
        ans+=1
    s += d
    if(R<s):
        break


print(ans)

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:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	A
# CreatedDate:  2020-07-11 21:00:33 +0900
# LastModified: 2020-07-11 21:03:48 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd


def main():
    L, R, d = map(int, input().split())
    left = L//d
    cnt = 0
    while (left+1)*d <= R:
        cnt += 1
        left += 1
    if L%d==0:
        cnt += 1
    print(cnt)




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

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

print(answer)

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

def main(l,r,d):
    ql=(l-1)//d
    qr=r//d
    ans=qr-ql
    return ans

if __name__=='__main__':
    l,r,d=readinput()
    ans=main(l,r,d)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    L, R, d = map(int,input().split())
    m = (L + d- 1) // d
    M = R // d
    print(M - m + 1) 


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

print(ans)

Submission status: Accepted

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

L,R,d=(int(x) for x in input().rstrip('\n').split())
res = 0
for i in range(L,R+1):
  if i % d == 0:
    res += 1
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

l_d = math.floor((L-1)/d)
r_d = math.floor((R)/d)

ans = r_d - l_d
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(1, 150):
    if L <= i * d <= R:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
import sys
import numpy as np
# from decimal import Decimal
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]


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


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


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


if __name__ == "__main__":
    solve()

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

Submission status: Accepted

Solution code:
import sys


def resolve(in_):
    l, r, d = map(int, in_.readline().split())
    return sum(1 for i in range(l, r + 1) if i % d == 0)


def main():
    answer = resolve(sys.stdin.buffer)
    print(answer)


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

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

print(cnt)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code h
l,r,d=map(int,input().split())
ans=0
for i in range(l,r+1):
    ans += i%d == 0
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
min_num, max_num, mul = map(int, input().split())

numbers = set(range(min_num, max_num+1))
multiples = set([mul*i for i in range(1, 100+1)])

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

print(cnt)

Submission status: Accepted

Solution code:
L,S,d = map(int,input().split())
a = 0
for i in range(L,S+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())

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

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
from sys import stdin,setrecursionlimit
import heapq,bisect,math,itertools,string,queue,copy
setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, stdin.readline().split()))

L,R,d = inpl()

count = 0
if L % d == 0:
    k = int(L/d)
else:
    k = int(L/d)+1

k = k* d
while k <= R:
    count += 1
    k += d
print(count)

Submission status: Accepted

Solution code:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

l,r,d=nm()

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

a = L // d
b = R // d
ans = b - a

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

Submission status: Accepted

Solution code:
# itne me hi thakk gaye?
a = 0
p ,q, r = map(int, input().split())
for i in range(p, q+1):
    if (i%r == 0):
        a += 1
print(a)

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

ans = 0

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

print(ans)

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())
 
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
# -*- coding: 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())

if l%d==0:
  shita=l//d
else:
  shita=l//d + 1

ans=r//d-shita + 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

print(ii)

Submission status: Accepted

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

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

print(f)

Submission status: Accepted

Solution code:
x,y,num = map(int,input().split())
count = 0
for i in range(x,y + 1):
  if i%num == 0:
    count += 1
print(count)

Submission status: Accepted

Solution code:
import sys
import copy
from collections import deque
import collections
stdin = sys.stdin

mod = 10**9+7

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

a, b, c = na()

if a%c==0:
    p = a//c - 1
else:
    p = a//c

res = b//c - p
print(res)

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 = r//d
b = l//d
c = l%d
if(c == 0):
    print(a-b+1)
else:
    print(a-b)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())
cnt = 0
a = l
while True:
    if a % d == 0:
        break
    else:
        a += 1
while True:
    if a > r:
        break
    cnt += 1
    a += d
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

for x in range(1, 101):
    if x >= l and x <= r and x % 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:
import math

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

Submission status: Accepted

Solution code:
import numpy as np


def main(L, R, d):
    num = L
    ans = 0
    while True:
        if num % d == 0:
            ans += 1
        if num >= R:
            break
        num += 1
    return ans


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

Submission status: Accepted

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

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

Submission status: Accepted

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

n = 0
for i in range(L, R+1):

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

print(n)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(hoge)

Submission status: Accepted

Solution code:
def function(numbers):
    L = int(numbers[0])
    R = int(numbers[1])
    d = int(numbers[2])
    number = 0
    i = L
    while(i <= R):
        if i % d == 0:
            number += 1
        i += 1
    return number


if __name__ == '__main__':
    numbers = input().split()
    print(function(numbers))

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

Submission status: Accepted

Solution code:
#!python3

import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())

def resolve():
    L, R, d = iim()

    a, b = divmod(L, d)
    if b == 0:
        a -= 1
    print(R//d - a)


if __name__ == "__main__":
    resolve()

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A=list(map(int,input().split()))
L=A[0]
R=A[1]
d=A[2]
p=R//d
q=L//d
if L%d==0:
    print(p-q+1)
else:
    print(p-q)

Submission status: Accepted

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

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())
n = L
a = 0
while n<=R:
    if n%d==0:
        a = a+1
        n = n+1
    else:
        n = n+1
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def readstr():
    return input().strip()


def readint():
    return int(input())


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


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


def main():
    L, R, d = readnums()
    ans = (R - L) // d
    if not L % d:
        ans += 1
    elif not R % d:
        ans += 1
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

lis =[]

for i in range(l,r+1):
    if i % d ==0:
        lis.append(i)
print(len(lis))

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

ln = l // d
rd = r // d

if l % d == 0:
    rd += 1

print(rd - ln)

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())
i=L
r=0

while(i<R+1):
  if(i%d==0):
    r+=1
  i+=1

print(r)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
@author: H_Hoshigi
"""
def main():
    L, R, d = map(int, input().split())
    
    N_R = R//d
    N_L = (L-1)//d
    print(N_R - N_L)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

ls = L // d
rs = R // d + (L % d == 0)

print(rs - ls)

Submission status: Accepted

Solution code:
l, r, d = map(int, input().split())
mul = 1
count = 0
while True:
    if l <= mul * d <= r:
        count += 1
    mul += 1
    if mul * d > r:
        break
print(count)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import math

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

small = math.ceil(L / d)
big = R // d

print(big - small + 1)

Submission status: Accepted

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

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=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 not i%d:
    ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

def main():
    L, R, d = map(int, read().split())
    ans = R // d - (L-1) // d
    print(ans)
    return

if __name__ == '__main__':
    main()

Submission status: Accepted

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

a = []
for i in range(l, r + 1):
    if i % d == 0:
        a.append(i)

print(len(a))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def cin():
    return input().split()

x = cin()
l = int(x[0])
r = int(x[1])
d = int(x[2])
sum = 0;
for i in range(l,r+1):
    if i % d == 0:
        sum += 1
print(sum)

Submission status: Accepted

Solution code:
input =raw_input

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#n, m, q = map(int, input().split())
#List = list(map(int, input().split()))
#req = [list(map(int, input().split())) for _ in range(q)]
#t = t[:-1]
#print(ans[j], end = "") 改行無しで出力
#[0]*n
#sort = sorted(a)[::-1] 降順
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
while l <= r:
  if l%d == 0:
    ans += 1
  l += 1

print(ans)

Submission status: Accepted

Solution code:
def main():
        L, R, d = map(int,input().split())
        gap = R-L
        cnt = 0

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

main()

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

Submission status: Accepted

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

p = d
i=1
c=0
while(p<=r):
    p=d*i
    if(l<=p<=r):
        c+=1

    i+=1
print(c)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L, R, D = map(int, input().split())
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:
A,B,C = map(int , input().split())
S = []
for i in range(B-A + 1):
    S.append(A+i)
M= 0
for j in range (len(S)):
    if (S[j] % C) == 0:
        M += 1
print(M)

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())
l_ = l // d
r_ = r // d
if l % d == 0:
    print(r_-l_+1)
else:
    print(r_-l_)

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

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 = input().split(" ")

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

print(num)

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