← Back to List

28915번: Книжная полка ↗

Solutions

Python 3
504 B | 504 chars
import sys
from math import sqrt, pi, sin, factorial, ceil, floor

BLANK = " "

inp = input
# inp = lambda : sys.stdin.readline()[:-1].strip()
mii = lambda x = BLANK : [*map(int,inp().split(x))]
mfi = lambda x = BLANK : [*map(float,inp().split(x))]
ii = lambda : int(inp())
fi = lambda : float(inp())
p = print


def solve():
  h = ii()
  r = ii()
  
  ln = floor((sqrt(3) * h / 2))
  p(r // ln + int(r % ln > 0) - 1)

  
if __name__ == "__main__":
  tc = 1

  for t in range(1, tc+1):
    ret = solve()