Problem:


Score : 100 points

Problem Statement

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

Constraints

All values in input are integers.

1 \leq L \leq R \leq 100

1 \leq d \leq 100

Input

Input is given from Standard Input in the following format:

L R d

Output

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

Sample Input 1

5 10 2

Sample Output 1

3

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

Sample Input 2

6 20 7

Sample Output 2

2

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

Sample Input 3

1 100 1

Sample Output 3

100



Sample input:
5 10 2


Sample output:
3

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
#======================================================#
def main():
    l, r, d = MII()
    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:
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

l,r,d = mi()

cnt=0
while 1:
    if l%d==0:
        cnt+=1
    if l==r:
        print(cnt)
        exit()
    l+=1

Submission status: Accepted

Solution code:
#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
import bisect
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()))
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())
count = 0
for i in range(L, R+1):
    if i % d == 0:
        count += 1
print(count)

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L, R, D = map(int, input().split())
ans = 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 numpy as np
import math
import scipy as sp
import queue
import collections

MOD = 10 ** 9 + 7
INF = 10 ** 9

def main(kwargs):
    l = kwargs["l"]
    r = kwargs["r"]
    d = kwargs["d"]
    res = 0

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

    return res

if __name__ == "__main__":
    kwargs = {}

    cin = input().split()
    kwargs["l"], kwargs["r"], kwargs["d"] = [int(i) for i in cin]

    cout = main(kwargs)
    print(cout)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(700000)

def s_in():
    return input()

def n_in():
    return int(input())

def l_in():
    return list(map(int, input().split()))

l,r,d = l_in()

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

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
sys.setrecursionlimit(10**6)


def main(input, print):
    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(sys.stdin.readline, print)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math
#import numpy as np
import itertools
import queue
import bisect
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7)

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

    return None

if __name__ == '__main__':
    main()

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)


if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

a = sum(1 if d <= n and n % d == 0 else 0 for n in range(l, r+1))
print(a)

Submission status: Accepted

Solution code:
from math import *
l,r,d=map(int,input().split())
print(floor(r/d)-ceil(l/d)+1)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#関数リスト
import sys
import numpy as np
input = sys.stdin.readline

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

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

Submission status: Accepted

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

ans = 0
for i in range(200):
    if L <= d * i <= R:
        ans += 1
print(ans)

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

print(ans)

Submission status: Accepted

Solution code:
l, r, d = (int(each) for each in 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())

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

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 幅優先探索（行きがけ）
import collections
import sys


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


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


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

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    L, R, D = map(int, input().split())

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


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def calc(x,d):
    return x//d

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

Submission status: Accepted

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

Submission status: Accepted

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

counter = L
answer = 0
while counter <= R:
    if counter % d == 0:
        answer += 1
    counter += 1
print(answer)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(rr-ll)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

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

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())
t = d
ans = 0
while t <= R:
    if L <= t <= R:
        ans += 1
    t += 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 
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
    print(c)
    
main()

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:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
l, r, d = map(int, input().split())
count = 0
for i in range(l, r + 1):
    if i % d == 0:
        count += 1
print(count)

Submission status: Accepted

Solution code:
l, r, d = (int(x) for x in input().split())
ans = r//d - (l-1)//d
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

Solution code:
def main():
    import sys
    L,R,d=list(map(int,sys.stdin.readline().split()))
    print(R//d-(L-1)//d)

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0 
for 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())
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,open(0).read().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:
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
import heapq
import math
from fractions import gcd
import random
import string
import copy
from itertools import combinations, permutations, product
from operator import mul
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

#############
# Main Code #
#############

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

Submission status: Accepted

Solution code:
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineering College

'''
from os import path
import sys
from heapq import heappush,heappop
from functools import cmp_to_key as ctk
from collections import deque,defaultdict as dd 
from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
from itertools import permutations
from datetime import datetime
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())
abc='abcdefghijklmnopqrstuvwxyz'
mod=1000000007
# mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]

def bo(i):
    return ord(i)-ord('a')

file=0





def solve():


    # for _ in range(ii()):
    
        

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








        
if __name__ =="__main__":

    if(file):

        if path.exists('input1.txt'):
            sys.stdin=open('input1.txt', 'r')
            sys.stdout=open('output1.txt','w')
        else:
            input=sys.stdin.readline
    solve()

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())
Rx=R//d
Lx=L//d
if L%d==0:
    Lx-=1
print(Rx-Lx)

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

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

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

if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def resolve():
    '''
    code here
    '''
    L, R, d = [int(item) for item in 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 = list(map(int,input().split()))

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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


def compute(le, ri, d):
    return sum(x % d == 0 for x in range(le, ri + 1))


def main():
    le, ri, d = (int(z) for z in input().split())
    res = compute(le, ri, d)
    print(res)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
lower, upper, d_baisuu = map(int, input().split())

cnt = 0

for num in range(lower, upper + 1):
    if (num % d_baisuu == 0):
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
def main():
    left, right, div = [int(x) for x in input().split()]
    ans = sum(x % div == 0 for x in range(left, right + 1))
    print(ans)


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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
l, r , d = [int(i) for i in input().split()]

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

Submission status: Accepted

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

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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:
#K = input()
X = list(map(int, input().split()))
#s = input().split()
#N = int(input())

count = 0

for i in range(X[0], X[1]+1):
    if (i % X[2] == 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())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#N = int(input())
#S = str(input())
L, R, d = map(int, input().split())
#A = list(map(int, input().split()))

ll = int((L - 1) // d)
rr = int(R // d)
print(rr -ll)

Submission status: Accepted

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


# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


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

    return cnt

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

Submission status: Accepted

Solution code:
## coding: UTF-8
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:
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
    else:
        pass

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

Submission status: Accepted

Solution code:
#!python3.8
# -*- coding: utf-8 -*-
# aising2020/aising2020_a
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    L, R, d = i2nn()
    print(R // d - (L - 1) // d)
    return

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(500000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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
readline = sys.stdin.readline

def solve():
    L, R, d = map(int, readline().split())

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


solve()

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

'''
Author: andyli
Time: 2020-07-11 19:58:46
'''

import os
from io import BytesIO, IOBase
import sys
import math

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


# region fastio
BUFSIZE = 1048576


class FastIO(IOBase):
    newlines = 0

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

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

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

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


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


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
def input(): return sys.stdin.readline().rstrip('\r\n')

# endregion


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
L, R, d = 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:
def main():
    # a = input()
    # n = int(input())
    # a = list(map(int, input().split()))
    l, r, d = map(int, input().split())

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

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

print(cnt)