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

Submission status: Accepted

Solution code:
ma = lambda :map(int,input().split())
ni = lambda:int(input())
import collections
import math
import itertools
gcd = math.gcd
l,r,d = ma()
c= 0
for i in range(l,r+1):
    if i%d==0:
        c+=1
print(c)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


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


if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

L,R,d = LI()

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
L,R,D=map(int,input().split())
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())
if l == 1:
  print(r//d)
else:
  print(r//d - (l-1)//d)

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:
def INT():
    return int(input())

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

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

L, R, d = MI()
ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import lru_cache
import bisect
import re
import queue
import copy
import decimal


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


def pop_count(x):
    x = x - ((x >> 1) & 0x5555555555555555)
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    x = x + (x >> 32)
    return x & 0x0000007f


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


def main():
    # sys.setrecursionlimit(1000000)
    # sys.stdin = open("sample.txt")
    # T = Scanner.int()
    # for _ in range(T):
    #     solve()
    # print('YNeos'[not solve()::2])
    solve()


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

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

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

    print(ans)
    return


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

input = sys.stdin.readline


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

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
l,r,d = readInts()
print(r//d - (l-1)//d)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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

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

Submission status: Accepted

Solution code:
L, R, d = map(int, input().split())
ans = 0
for n in range(L, R + 1):
    if n % 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:
import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque, defaultdict
#deque(l), pop(), append(x), popleft(), appendleft(x)
#q.rotate(n)で → にn回ローテート
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations,product#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
#import fractions#古いatcoderコンテストの場合GCDなどはここからimportする
from functools import reduce,lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("## ",*x,file=sys.stderr)
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reverse=True)  #二個目の要素で降順並び替え

    #N = int(input())
    l,r,d = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    #S = tuple(tuple(map(int, input().split())) for i in range(N)) #改行行列

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




if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
# def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  l,r,d=LI()
  ans=0

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

  return ans

# main()
print(main())

Submission status: Accepted

Solution code:
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

l,r,d=nii()

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,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
	return list(map(int,input().split()))
def m(): #複数文字
	return map(int,input().split())
def onem(): #Nとかの取得
	return int(input())
def s(x): #圧縮
	a = []
	if len(x) == 0:
		return []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa != x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): #listをスペースごとに分ける
	return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
	return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
	ll = 0
	rr = r
	while True:
		mid = (ll+rr)//2

	if rr == mid:
		return ll
	if (ここに評価入れる):
		rr = mid
	else:
		ll = mid+1
"""

l,r,d = m()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# @author 

import sys

class ANumberOfMultiples:
    def solve(self, tc=0):
        l, r, d = [int(_) for _ in input().split()]

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


solver = ANumberOfMultiples()
input = sys.stdin.readline

solver.solve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right
from itertools import accumulate

sys.setrecursionlimit(10**6)
INF = 10**12
m = 10**9 + 7

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from operator import itemgetter

sys.setrecursionlimit(10**9)
input = sys.stdin.readline

def ii(): return int(input())
def mi(): return map(int, input().split())
def lmi(): return list(map(int, input().split()))
def iif(n): return [int(input()) for _ in range(n)]
def lmif(n): return [list(map(int, input().split())) for _ in range(n)]
def ss(): return input().split()

def main():
    mod = 1000000007
    
    l, r, d = mi()

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

    return

main()

Submission status: Accepted

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    L, R, d = il()

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


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

def solve():
    input = sys.stdin.readline
    L, R, d = map(int, input().split())
    print(R // d - (L - 1) // d)

    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

l,r,d = readInts()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return [LIST() for _ in range(n)]
def NSTR(n): return [input() for _ in range(n)]


INF = float("inf")
MOD = 10**9 + 7


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

    return


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:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
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()
    ans = 0
    for i in range(l,r+1):
        if i%d ==0 :
            ans += 1
    print(ans)
    return

#Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(500000)
MOD = 10**9+7

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

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

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]


def main():
    L, R, d = mi()
    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:
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L,R,D = [int(hoge) for hoge 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:
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

Solution code:
from sys import stdin
from sys import setrecursionlimit
from collections import Counter, deque, defaultdict
from math import floor, ceil
from bisect import bisect_left
from itertools import combinations
setrecursionlimit(100000)

INF = int(1e10)
MOD = int(1e9 + 7)

def main():
    from builtins import int, map
    L, R, d = map(int, input().split())
    count = 0
    for k in range(L, R + 1):
        if k % d == 0:
            count += 1
    print(count)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.buffer.readline()[:-1]
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

L, R, d = MAP()
print(R//d-(L-1)//d)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

Submission status: Runtime Error

Solution code:
import math

l = int(input())
r = int(input())
d = int(input())

min = math.floor(l/d)
max = math.floor(r/d)
if math.floor(l/d) == l/d:
  p = 1
else:
  p = 0
print(max - min + p)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <string>
#include <ctype.h>
#include <cstdlib>
#include <cmath>
#include <stack>
#include <numeric>
#include <map>
#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;

int main()
{
    int l,r,d;
    cin >> l >> r >> d;
    int cnt = 0;
    for (int i = l; i <= r; i++)
    {
        if (i%d == 0)
        {
            cnt++;
        }
        
    }
    cout << cnt << endl;
}

Submission status: Runtime Error

Solution code:
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
from math import sqrt
from collections import defaultdict
def main():
    n = int(input())
    n2 = int(sqrt(n) + 1)
    d1 = defaultdict(int)

    for i1 in range(1, n2):
        for i2 in range(1, n2):
            for i3 in range(1, n2):
                #p = (i1 + i2) ** 2 - (i1 * i2) + i3 * (i1 + i2 + i3)
                p = i1 ** 2 + i2 ** 2 + i3 ** 2 + i1 * i2 + i2 * i3 + i1 * i3
                d1[p] += 1

    for j1 in range(1, n + 1):
        print(d1[j1])

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
n = int(input())
m = int(-1 + (n-2) ** 0.5) + 1
for i in range(1,n+1):
  cnt = 0
  for x in range(1, m):
    for y in range(1, m):
      if (x+y)**2-4*(x**2+y**2+x*y-i) >0:
        z = (-(x+y)+((x+y)**2-4*(x**2+y**2+x*y-i))**0.5)/2       
        if z%1 == 0 and z>0:            
          cnt += 1
      else:
        break
  print(cnt)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main() {
	int L, R, d;
	cin >> L >> R >> d;
	int total = 0;
	for (int i = L; i < R + 1; i++) {
		if (i % d == 0) {
			total++;
		}
		else {
			continue;
		}
	}
	cout << total << endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
L, R, d = map(int, input())
print({(R-L)//d} + 1)

Submission status: Runtime Error

Solution code:
L, R, d = map(int, input())
a =
print({(R-L)//d} + 1)

Submission status: Runtime Error

Solution code:
L, R, d = map(int, input())
print({(R-L//d)} + 1)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
l = []

for i in range(a,b+1):
  if i%c==0:
    l.append(i)

print(len(l))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
ans = [0]*(N+1)
for x in range(1,80):
    for y in range(1,80):
        for z in range(1,80):
            tmp = x**2 + y**2 + z**2 +x*y + y*z + z*x
            if tmp > N:
                continue
            ans[tmp]+=1
for i in range(1,N+1):
    print(ans[i])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
lists = list(map(int, input().split()))

ans = 0

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
L= int(input(""))
R= int(input(""))
d= int(input(""))
list=[]
list2=[]
for I in range(L, R+1):
    list.append(I)
for I in list:
    if(I%d == 0):
        list2.append(I)
count=0
for I in list2:
        count= count +1
print(count)

Submission status: Runtime Error

Solution code:
n=int(input())
l=[0]*(n+1)
for i in range(10**2+1):
  for j in range(10**2+1):
    for k in range(10**2+1):
      tmp=i**2+j**2+k**2+i*j+j*k+k*i
      if tmp<=n:
        l[tmp]+=1
for li in l:
  print(li)

Submission status: Runtime Error

Solution code:
aa

Submission status: Runtime Error

Solution code:
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    for i in range(1,n+1):
        cnt=0
    
        for x in range(1,100):
            for y in range(1,100):
                for z in range(1,100):
                    
                    tmp2 = x*y + y*z + z*x
                    if (tmp2>i):
                        continue
                    tmp1 = x**2 + y**2 + z**2   
                    if (tmp1 + tmp2) == i:
                        cnt+=1
        print(cnt)

if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#! python3
# coding:utf-8

n = int(input())
for i in range(1,n+1):
    cnt=0

    for x in range(1,n+1):
        if x > 100:
            continue
        for y in range(1,n-x+1):
            for z in range(1,n-x-y+1):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                   
                if eq == i:
                    cnt+=1
    print(cnt)

Submission status: Runtime Error

Solution code:
k, x = map(int, input().split())
if 500*k >= x:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
def popcount(x): #xは10進数の整数
    return bin(x).count('1')
ma = 2*10**5
dp = [0] * ma
for i in range (1, ma):
    dp[i] = dp[i % popcount(i)] + 1
def solve(N, x):
    p = popcount(int(x, 2))
    nowp_p = int(x, 2) % (p+1)
    if p-1 != 0: 
        nowp_m = int(x, 2) % (p-1)
    x = list(x)#list
    for i in range(N):
        if x[i] == '0':
            print(dp[(nowp_p + 2**(N-i-1)) % (p + 1)] + 1)
        elif x[i] == '1':
            if p == 1:
                print(0)
            else:
                print(dp[(nowp_m - 2**(N-i-1) + p - 1) % (p - 1)] + 1)
N = int(input())
x = input() #str
solve(N, x)