Problem:


Score : 200 points

Problem Statement

We have a long seat of width X centimeters.
There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.

We would like to seat as many people as possible, but they are all very shy, and there must be a gap of length at least Z centimeters between two people, and between the end of the seat and a person.

At most how many people can sit on the seat?

Constraints

All input values are integers.

1 \leq X, Y, Z \leq 10^5

Y+2Z \leq X

Input

Input is given from Standard Input in the following format:

X Y Z

Output

Print the answer.

Sample Input 1

13 3 1

Sample Output 1

3

There is just enough room for three, as shown below:

Figure

Sample Input 2

12 3 1

Sample Output 2

2

Sample Input 3

100000 1 1

Sample Output 3

49999

Sample Input 4

64146 123 456

Sample Output 4

110

Sample Input 5

64145 123 456

Sample Output 5

109



Sample input:
13 3 1


Sample output:
3

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()))
## dp ##
def DD2(d1,d2,init=0): return [[init]*d2 for _ in range(d1)]
def DD3(d1,d2,d3,init=0): return [DD2(d2,d3,init) for _ in range(d1)]
## math ##
def to_bin(x: int) -> str: return format(x, 'b') # rev => int(res, 2)
def to_oct(x: int) -> str: return format(x, 'o') # rev => int(res, 8)
def to_hex(x: int) -> str: return format(x, 'x') # rev => int(res, 16)
MOD=10**9+7
def divc(x,y) -> int: return -(-x//y)
def divf(x,y) -> int: return x//y
def gcd(x,y):
    while y: x,y = y,x%y
    return x
def lcm(x,y): return x*y//gcd(x,y)
def enumerate_divs(n):
    """Return a tuple list of divisor of n"""
    return [(i,n//i) for i in range(1,int(n**0.5)+1) if n%i==0]
def get_primes(MAX_NUM=10**3):
    """Return a list of prime numbers n or less"""
    is_prime = [True]*(MAX_NUM+1)
    is_prime[0] = is_prime[1] = False
    for i in range(2, int(MAX_NUM**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i*2, MAX_NUM+1, i):
            is_prime[j] = False
    return [i for i in range(MAX_NUM+1) if is_prime[i]]
## libs ##
from itertools import accumulate as acc, combinations as combi, product, combinations_with_replacement as combi_dup
from collections import deque, Counter
from heapq import heapify, heappop, heappush
from bisect import bisect_left
#======================================================#

def main():
    x,y,z = MII()
    print((x-z)//(y+z))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

X, Y, Z = map(int, input().split())

print((X - Z) // (Z + Y))

Submission status: Accepted

Solution code:
X,Y,Z = map(int,input().split())
ans = (X-Z)//(Y+Z)
print(ans)

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())

l = y + 2*z
ans = 0
while l <= x:
    l += y + z
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())

ans = 0
x -= z
while x >= 0:
    x -= y+z
    if x >= 0: ans += 1

print(ans)

Submission status: Accepted

Solution code:
X,Y,Z=map(int,input().split())
ans=X//(Y+Z)
if X%(Y+Z)<Z:
    print(ans-1)
else:
    print(ans)

Submission status: Accepted

Solution code:
x, y, z = list(map(int, input().split()))
print((x - z) // (y + z))

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
ans=int(x/(y+z))
if x-ans*(y+z)>=z:
    print(ans)
else:
    print(ans-1)

Submission status: Accepted

Solution code:
x, y, z = list(map(int, input().split()))
print((x - z) // (y + z))

Submission status: Accepted

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache


#############
# Constants #
#############

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

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def Yes(): print("Yes"); return
def No(): print("No"); return

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

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

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

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

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def Base_10_to_n(X, n):
  if (int(X/n)):
    return Base_10_to_n(int(X/n), n)+[X%n]
  return [X%n]


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

X,Y,Z = inputIL()

print((X-Z)//(Y+Z))

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
l=[z]
per=(x-z)//(y+z)
print(per)

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
l=[z]
per=0

per=(x-z)//(y+z)

print(per)

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
x -= z
print(x//(y+z))

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    X, Y, Z = map(int, input().split())

    ans = (X - Z) // (Y + Z)

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
num = x-z
ans = 0
ans += num // (y+z)
print(ans)

Submission status: Accepted

Solution code:
a,b,c = map(int, input().split())

print(int((a-c)/(b+c)))

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

def main():
    X,Y,Z=map(int,input().split())
    print((X-Z)//(Y+Z))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
X, Y, Z= map(int, input().split())

ans = X - Z

print(ans//(Y+Z))

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())

ans = 0
x -= z
while x >= y + z:
    ans += 1
    x -= y + z

print(ans)

Submission status: Accepted

Solution code:
X,Y,Z = map(int,input().split())

tmp = X - Z

print(tmp//(Y+Z))

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
isu = z
count = 0
while isu<=x-z:
    if isu+y<=x-z:
        isu += y
        isu += z
        count += 1
    else:
        break
print(count)

Submission status: Accepted

Solution code:
X,Y,Z=map(int,input().split())
ans=X//(Y+Z)
if X%(Y+Z)<Z:
    print(ans-1)
else:
    print(ans)

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def solve(x, y, z):
    max_val = 0
    for i in range(10 ** 18):
        if y * i + z * (i + 1) <= x:
            max_val = i
        else:
            break
    return max_val

def main():
    x, y, z = map(int, input().split())
    print(solve(x, y, z))
 
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())
print((X - Z)//(Y + Z))

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())

print((X - Z) // (Y + Z))

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
temp=z
result=0
while temp<=x-y-z:
  temp=temp+y+z
  result=result+1
print(result)

Submission status: Accepted

Solution code:
X,Y,Z = list(map(int,input().split()))
print((X-Z)//(Y+Z))

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
b = 0
for i in range(1,x+1):
    a = (i*(y+z))+z
    #print(x/a)
    if a>x:
        print(b)
        break
    else:
        b+=1

Submission status: Accepted

Solution code:
x,y,z = (int(x) for x in input().split())
cnt = 0

while x >= y*cnt+z*(cnt+1):
	if x == y*cnt+z*(cnt+1):
		print(str(cnt))
		break
	cnt+=1
else:
	print(str(cnt-1))

Submission status: Accepted

Solution code:
import sys
import math
x, y, z = map(int, input().split())
tmp=1
while ((tmp*y+(tmp+1)*z)<=x):
    tmp += 1
print(tmp-1)

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
a = x-z
b = a//(y+z)
print(b)

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())
print((X-(Y+2*Z)) // (Y+Z) + 1)

Submission status: Accepted

Solution code:
x,y,z = map(int, input().split())

n = 1
while x >= (n+1)*z + n*y:
  n += 1
print(n-1)

Submission status: Accepted

Solution code:
def solve(x, y, z):

    tmp = x - z
    ans = tmp // (y + z)

    return ans

if __name__ == "__main__":
    x, y, z = [int(i) for i in input().split()]
    print(solve(x,y,z))

Submission status: Accepted

Solution code:
def resolve():
	x, y, z = map(int, input().split())
	print((x-z)//(y+z))
resolve()

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi
# endregion
#------------------------------------------------------#
X, Y, Z = ri_()
print((X - Z) // (Y + Z))

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
a=x//(y+z)
print(a-1 if a*(y+z)+z>x else a)

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
ans=0
for i in range(x):
    if x>=i*(y+z)+z and i>ans:
        ans=i
print(ans)

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())

print((x-z) // (y+z))

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
ans = (x - z)//(y + z)

print(ans)

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())

ans = 0
x -= z
for i in range(100000):
    if x >= y + z:
        ans += 1
        x -= y + z
    else:
        break

print(ans)

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())

def is_ok(key):
    if key * Y + (key + 1) * Z <= X:
        return True
    else:
        return False

def binary_search():
    ok = 0
    ng = 3000001
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if is_ok(mid):
            ok = mid
        else:
            ng = mid
    return ok

print(binary_search())

Submission status: Accepted

Solution code:
x,y,z=[int(x) for x in input().split()]

print((x-z)//(y+z))

Submission status: Accepted

Solution code:
X, Y, Z = list(map(int, input().split()))
W = X - Z*2
if W < Y:
    print(0)
else:
    W -= Y
    ans = 1

    ans += W // (Y+Z)
    print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,sqrt
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()

x,y,z=MI()
ans=int((x-z)/(y+z))
print(ans)

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
x -= z
print(x//(y+z))

Submission status: Accepted

Solution code:
x,y ,z= map(int,input().split())
print((x-z)//(y+z))

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())
ans = 0
for i in range(1, X // Y + 1):
    if X - Y * i - (i + 1) * Z >= 0:
        ans = i
    else:
        break
print(ans)

Submission status: Accepted

Solution code:
X,Y,Z=map(int,input().split())
ans=X//(Y+Z)
if X<ans*(Y+Z)+Z:
  print(ans-1)
else:  
  print(ans)

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())
person = 0

while (Y + Z) * (person + 1) + Z <= X:
    person += 1

print(person)

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
print((x-z) // (y + z))

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

x,y,z = map(int,input().split())
x-= 2*z
ans = x//(y+z)
if x%(y+z)>=y:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
A,B,C = list(map(int,input().split()))
ans = 0
if B + C * 2 > A:
    print(ans)
    exit()
A -= B + C * 2
ans += 1
while A // (B+C) >= 1:
    A -= B + C 
    ans += 1
print(ans)

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
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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 zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

X, Y, Z =MAP()
print((X-Z)//(Y+Z))

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
ans=(x-z)//(y+z)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X,Y,Z = map(int,input().split())
temp = X-Z
ans = temp//(Y+Z)
print(ans)

Submission status: Accepted

Solution code:
X,Y,Z=map(int,input().split())

answer=0
width=Y+2*Z
while(width<=X):
  answer+=1
  width+=Y+Z
  
print(answer)

Submission status: Accepted

Solution code:
X,Y,Z=map(int,input().split())

for i in range(1,10**9):
  width=i*Y+(i+1)*Z
  if width>X:
    break

print(i-1)

Submission status: Accepted

Solution code:
X,Y,Z = map(int,input().split())

L = X -2*Z
P = L // (Y+Z)
if L - P*(Y+Z) >= Y:
  print(P+1)
else:
  print(P)

Submission status: Accepted

Solution code:
X,Y,Z=map(int,input().split())
print(int((X-Z)/(Z+Y)))

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
a=1+(x-y-2*z)//(y+z)
print(a)

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
ans = 1
capa = 0
while True:
    capa = ans * y + ans * z + z
    if capa > x:
        break
    ans += 1
print(ans-1)

Submission status: Accepted

Solution code:
x,y,z = map(int, input().split())
"""
n*y + z*(n+1) <= x
n(y+z) >= x + z
n <= (x+z) // (y+z)

"""

print((x-z)//(y+z))

Submission status: Accepted

Solution code:
X,Y,Z=map(int,input().split())

ans=0
while ans*Y+(ans+1)*Z<=X:
    ans+=1

print(ans-1)

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
x -= z
print(x // (y+z))

Submission status: Accepted

Solution code:
X,Y,Z=map(int,input().split())
W=Y+Z
cnt=0
X-=Z*2
while X>W:
    X-=W
    cnt+=1
if X>=Y:
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
X,Y,Z=map(int,input().split())

s = X//(Y+Z)
if X - s*(Y+Z) < Z:
    print(s - 1)
else:
    print(s)

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())
tmp = X//(Y+Z)
if X - tmp*(Y+Z) < Z:
    print(tmp - 1)
else:
    print(tmp)

Submission status: Accepted

Solution code:
X,Y,Z = map(int,input().split())
X_new = X-Z
print(int(X_new /(Z+Y)))

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
ans = (x-z)//(y+z)
print(ans)

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
print((x-z)//(y+z))

Submission status: Accepted

Solution code:
import math
x,y,z=map(int,input().split())
print(math.floor((x-z)/(y+z)))

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
x -= 2*z
ans = 1
x -= y
ans += x//(y+z)
print(ans)

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
ans = 0
x -= 2 * z
while x >= y:
    x -= y
    ans += 1
    x -= z
print(ans)

Submission status: Accepted

Solution code:
x , y , z = map(int, input().split())
ans=(x-z)//(y+z)
print(ans)

Submission status: Accepted

Solution code:
X,Y,Z=map(int,input().split())
print(X//(Y+Z) if (X%(Y+Z))>=Z else (X//(Y+Z))-1)

Submission status: Accepted

Solution code:
X,Y,Z = map(int, input().split())
X -= 2 * Z
X -= Y
ans = 0
if 0 <= X:
    ans = 1 + X // (Y + Z)

print(ans)

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
print (-(-((x-z)//(y+z))))

Submission status: Accepted

Solution code:
import math
X,Y,Z=map(int, input().split())
print(math.floor((X-Z)/(Y+Z)))

Submission status: Accepted

Solution code:
x,y,z=map(int, input().split())
x-=(y+2*z)
c=1
c+=x//(y+z)
print(c)

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
x=x-z
print(x//(y+z))

Submission status: Accepted

Solution code:
X, Y, Z = map(int,input().split())
print((X-Z) // (Y+Z))

Submission status: Accepted

Solution code:
def resolve():
    X, Y, Z = list(map(int, input().split()))
    print((X-Z)//(Y+Z))
    

            

if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
print (int((x-z)/(y+z)))

Submission status: Accepted

Solution code:
x, y, z = map(int,input().split())
n = x
ans = 1

while True:
    n = (ans+1)*z + ans*y
    if n > x:
        break
    ans += 1

print(ans-1)

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
x = x-z
c = y+z
n = 0
while 0 < x:
  if c <= x:
    n = n+1
    x = x-c
  else:
    break
print(n)

Submission status: Accepted

Solution code:
x, y, z = [int(x) for x in input().split()]

print((x - z) // (z + y))

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
x = x - z
print(x//(y+z))

Submission status: Accepted

Solution code:
icase=0
if icase==0:
    x,y,z=map(int,input().split())
    n=x//(y+z)
    if x%(y+z)>=z:
        print(n)
    else:
        print(n-1)

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
width = y + z
print((x-z) // width)

Submission status: Accepted

Solution code:
# solution
import io

n, m, k = [ int(i) for i in input().split() ]
print((n-k)//(m+k))

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())
for i in range(10**5):
    if X < i * Y + (i + 1) * Z:
        print(i - 1)
        exit()

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
x -= z * 2
c = x // (y + z)
if x - (y + z) * c >= y:
    c += 1
print(c)

Submission status: Accepted

Solution code:

x,y,z = map(int,input().split())
ans = int((x-z)//(y+z))
print(ans)

Submission status: Accepted

Solution code:
from sys import stdin
import math

x,y,z=map(int, input().split())
print((x-z)//(y+z))

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
ans = (x - z) // (y + z)
print(int(ans))

Submission status: Accepted

Solution code:
def main():
    X, Y, Z = map(int, input().split())
    print((X-Z)//(Y+Z))
main()

Submission status: Accepted

Solution code:
X,Y,Z = map(int,input().split())

t = 2*Z
c = 0
while (True):
  t+=Y 
  if t>X:
    print(c)
    exit()
  t+=Z
  c+=1

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())

x -= z
print(x // (y + z))

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())
ans = 0

X -= Z
while True:
    if X >= Y+Z:
        ans += 1
        X -= (Y+Z)
    else:
        break

print(ans)

Submission status: Accepted

Solution code:
# ABC 078: B – ISU
x, y, z = map(int, input().split())
print((x - z) // (z + y))

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())

ans = int(x/(y+z))
if x%(y+z) < z:
    ans -= 1
print(ans)

Submission status: Accepted

Solution code:
x, y, z = input().split()
x = int(x)
y = int(y)
z = int(z)

cnt = 0
rest = x

while(True):
    if(rest - (y + z) >= z):
        x -= y + z
        cnt += 1
        rest -= (y + z)
    else:
        break


print(cnt)

Submission status: Accepted

Solution code:
X,Y,Z = map(int,input().split())

N=(X-Z)//(Y+Z)
print(N)

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())
b = Y + 2 * Z
ans = 1
while True:
  b += Y + Z
  if b > X:
    break
  else:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())
s = X - (X//(Y+Z))*(Y+Z)
print(X//(Y+Z) if s >= Z else X//(Y+Z)-1)

Submission status: Accepted

Solution code:
x,y,z=[int(i) for i in input().split()]
print((x-z)//(y+z))

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
res = (x - z) // (y + z)
print(res)

Submission status: Accepted

Solution code:
# import sys
import math #sqrt,gcd
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import permutations #順列生成
# import collections # deque
# from operator import itemgetter
# from fractions import Fraction

mod = int(1e9+7)
INF = 1<<29
lINF = 1<<35

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

def main():
    x,y,z = readInt()
    ans = 0
    while True:
        if y*(ans+1)+z*(ans+1)<=x-z:
            ans += 1
        else:
            break
    print(ans)
    return

if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())

print((X-Z) // (Y+Z))

Submission status: Accepted

Solution code:
x, y, z = map(int,input().split())
print((x-z)//(y+z))

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())
ans = 0

for i in range(1, X):
    if i*Y+(i+1)*Z <= X:
        ans = i
    else:
        break
print(ans)

Submission status: Accepted

Solution code:
X,Y,Z = map(int,input().split())
print((X-Z) // (Y+Z))

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
r, q = divmod(x, y + z)
if q >= z:
    print(r)
else:
    print(r - 1)

Submission status: Accepted

Solution code:
x,y,z = map(int, input().split())
print((x-z)//(z+y))

Submission status: Accepted

Solution code:
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""

# Written by NoKnowledgeGG @YlePhan

import math
#mod = 10**9+7



def main():
  x,y,z = map(int,input().split())
  
  x -= z
  print(x//(y+z))
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
X,Y,Z=map(int,input().split())
a=X-Z
b=Y+Z
print(a//b)

Submission status: Accepted

Solution code:
def main(x, y, z):
    print((x - z) // (y + z))


if __name__ == "__main__":
    x, y, z = map(int, input().split())
    main(x, y, z)

Submission status: Accepted

Solution code:

import math
import itertools
import statistics
#import numpy as np
import collections

#n = int(input())
x, y, z = list(map(int, input().split()))

x -= z
print(x//(y+z))

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())
isu = X - Z
hito = Y + Z
print(isu // hito)

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())

ans = (x-z)//(y+z)

print(ans)

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
n=1
while y*n+z*(n+1)<=x:
  n+=1
print(n-1)

Submission status: Accepted

Solution code:
def main():
    x, y, z = map(int, input().split())
    x = x - z
    ans = x // (y+z)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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


def solve(X: int, Y: int, Z: int):
    print((X - Z) // (Y + Z))


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    Z = int(next(tokens))  # type: int
    solve(X, Y, Z)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
w=y+z
print(x//w if x%w>=z else x//w-1)

Submission status: Accepted

Solution code:
t = [int(v) for v in input().split()]
isu = t[2]
count = 0
while isu <= t[0]:
    isu += t[1] + t[2]
    if isu > t[0]:
        break
    count += 1
print(count)

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())

print(x//(y+z) if x%(y+z)>=z else x//(y+z)-1)

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())

print((x - 1 * z) // (y + z))

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())

print((X - Z) // (Y + Z))

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

x,y,z = iim()
print((x-z)//(z+y))

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())

rm = x % (y+z)
a = -1 if rm < z else 0
print(x // (y + z) + a)

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())

length = x - 2*z

c = 1
while True:
    if (y*c)+(z*(c-1)) > length:
        break
    
    c += 1

print(c-1)

Submission status: Accepted

Solution code:
X,Y,Z = map(int,input().split())
n = X // (Y+Z)

if X % (Y+Z) < Z :
    print(n-1)
else:
    print(n)

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
x-=z
ans=x//(y+z)
rem=x%(y+z)
print(ans)

Submission status: Accepted

Solution code:
import math
import string
import collections
from collections import Counter


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]

x, y, z = map(int, input().split())
n = 0
while(y*n+z*(n+1) <= x):
    n += 1
print(n-1)

Submission status: Accepted

Solution code:
X,Y,Z = map(int,input().split())
print((X-Z)//(Y+Z))

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
for i in range(x,0,-1):
    if i*y+(i+1)*z<=x:
        print(i)
        break

Submission status: Accepted

Solution code:
import math

x,y,z=map(int,input().split())

if x%(y+z)>=z:
  print(math.floor(x/(y+z)))
else:
  print(math.floor(x/(y+z)-1))

Submission status: Accepted

Solution code:
X,Y,Z = map(int, input().split())

X -= 2*Z
ans = X // (Y+Z)
X %= (Y+Z)
if X >= Y:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
if x < y+z*2:
    print(0)
else:
    ans = (x-(y+z*2))//(y+z)+1
    print(ans)

Submission status: Accepted

Solution code:
X,Y,Z = map(int,input().split())

a=(X-Z)//(Y+Z)
print(a)

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
c = (x - z)//(y+z)
print(c)

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())
print((X-Z)//(Z+Y))

Submission status: Accepted

Solution code:
# Problem B - ISU

# input
x, y, z = map(int, input().split())

# initialization
chair_len = x - 2 * z
max_count = 0

# count
i = 0
while True:
    if i%2==0:
        if chair_len-y<0:
            break
        max_count += 1
        chair_len -= y
    else:
        if chair_len-z<0:
            break
        chair_len -= z

    i += 1

print(max_count)

Submission status: Accepted

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

x, y, z = map(int, input().split())
for i in range(1, x):
    if y * i + z * (i + 1) > x:
        print(i - 1)
        exit()

Submission status: Accepted

Solution code:
x, y, z = list(map(int, input().split()))
count = 0
x -= z
print(x//(y+z))

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())

x-=z

print(x//(y+z))

Submission status: Accepted

Solution code:
x,y,z=list(map(int,input().split()))
x-=z
print(x//(y+z))

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
people = 0
x = x-2*z
while x-y >=0:
  x = x-y
  people += 1
  x -= z 
print(people)

Submission status: Accepted

Solution code:
x, y , z = map(int,input().split())
X = x -z
ans = X // (y+z)
print(ans)

Submission status: Accepted

Solution code:
x,y,z = map(int, input().split())
ret = (x-z)//(y+z)
print(ret)