


from collections.abc import Iterator, MutableMapping
from dataclasses import dataclass
from typing import Generic, TypeVar

UpperCamelCase								=	TypeVar("""KEY""")
UpperCamelCase								=	TypeVar("""VAL""")






@dataclass(frozen=UpperCamelCase					,							slots=UpperCamelCase			)
class   _lowerCamelCase (					Generic[KEY, VAL]			):




       """simple docstring"""
       snake_case      =    42
       snake_case      =    42






class   _lowerCamelCase (					_Item			):




       """simple docstring"""



       def __init__(      self		)->None:




         '''simple docstring'''





         super().__init__(_SCREAMING_SNAKE_CASE				,       _SCREAMING_SNAKE_CASE		)







       def __bool__(      self		)->bool:




         '''simple docstring'''





         return False




UpperCamelCase								=	_DeletedItem()






class   _lowerCamelCase (					MutableMapping[KEY, VAL]			):




       """simple docstring"""



       def __init__(      self				,       _SCREAMING_SNAKE_CASE = 8				,       _SCREAMING_SNAKE_CASE = 0.7_5		)->None:




         '''simple docstring'''





         A_      :				Any		     =					initial_block_size
         A_      :				list[_Item | None]		     =					[None] * initial_block_size
         assert 0.0 < capacity_factor < 1.0
         A_      :				int		     =					capacity_factor
         A_      :				str		     =					0



       def        _snake_case       (      self				,       _SCREAMING_SNAKE_CASE		)->int:




         '''simple docstring'''





         return hash(_SCREAMING_SNAKE_CASE		) % len(self._buckets		)



       def        _snake_case       (      self				,       _SCREAMING_SNAKE_CASE		)->int:




         '''simple docstring'''





         return (ind + 1) % len(self._buckets		)



       def        _snake_case       (      self				,       _SCREAMING_SNAKE_CASE				,       _SCREAMING_SNAKE_CASE				,       _SCREAMING_SNAKE_CASE		)->bool:




         '''simple docstring'''





         A_      :				Optional[int]		     =					self._buckets[ind]
         if not stored:
           A_      :				int		     =					_Item(_SCREAMING_SNAKE_CASE				,       _SCREAMING_SNAKE_CASE		)
           self._len += 1
           return True
         elif stored.key == key:
           A_      :				str		     =					_Item(_SCREAMING_SNAKE_CASE				,       _SCREAMING_SNAKE_CASE		)
           return True
         else:
           return False



       def        _snake_case       (      self		)->bool:




         '''simple docstring'''





         A_      :				Any		     =					len(self._buckets		) * self._capacity_factor
         return len(self		) >= int(_SCREAMING_SNAKE_CASE		)



       def        _snake_case       (      self		)->bool:




         '''simple docstring'''





         if len(self._buckets		) <= self._initial_block_size:
           return False
         A_      :				List[Any]		     =					len(self._buckets		) * self._capacity_factor / 2
         return len(self		) < limit



       def        _snake_case       (      self				,       _SCREAMING_SNAKE_CASE		)->None:




         '''simple docstring'''





         A_      :				List[str]		     =					self._buckets
         A_      :				Dict		     =					[None] * new_size
         A_      :				Optional[Any]		     =					0
         for item in old_buckets:
           if item:
             self._add_item(item.key				,       item.val		)



       def        _snake_case       (      self		)->None:




         '''simple docstring'''





         self._resize(len(self._buckets		) * 2		)



       def        _snake_case       (      self		)->None:




         '''simple docstring'''





         self._resize(len(self._buckets		) // 2		)



       def        _snake_case       (      self				,       _SCREAMING_SNAKE_CASE		)->Iterator[int]:




         '''simple docstring'''





         A_      :				Dict		     =					self._get_bucket_index(_SCREAMING_SNAKE_CASE		)
         for _ in range(len(self._buckets		)		):
           yield ind
           A_      :				List[str]		     =					self._get_next_ind(_SCREAMING_SNAKE_CASE		)



       def        _snake_case       (      self				,       _SCREAMING_SNAKE_CASE				,       _SCREAMING_SNAKE_CASE		)->None:




         '''simple docstring'''





         for ind in self._iterate_buckets(_SCREAMING_SNAKE_CASE		):
           if self._try_set(_SCREAMING_SNAKE_CASE				,       _SCREAMING_SNAKE_CASE				,       _SCREAMING_SNAKE_CASE		):
             break



       def __setitem__(      self				,       _SCREAMING_SNAKE_CASE				,       _SCREAMING_SNAKE_CASE		)->None:




         '''simple docstring'''





         if self._is_full():
           self._size_up()

         self._add_item(_SCREAMING_SNAKE_CASE				,       _SCREAMING_SNAKE_CASE		)



       def __delitem__(      self				,       _SCREAMING_SNAKE_CASE		)->None:




         '''simple docstring'''





         for ind in self._iterate_buckets(_SCREAMING_SNAKE_CASE		):
           A_      :				Optional[Any]		     =					self._buckets[ind]
           if item is None:
             raise KeyError(_SCREAMING_SNAKE_CASE		)
           if item is _deleted:
             continue
           if item.key == key:
             A_      :				Any		     =					_deleted
             self._len -= 1
             break
         if self._is_sparse():
           self._size_down()



       def __getitem__(      self				,       _SCREAMING_SNAKE_CASE		)->VAL:




         '''simple docstring'''





         for ind in self._iterate_buckets(_SCREAMING_SNAKE_CASE		):
           A_      :				Optional[Any]		     =					self._buckets[ind]
           if item is None:
             break
           if item is _deleted:
             continue
           if item.key == key:
             return item.val
         raise KeyError(_SCREAMING_SNAKE_CASE		)



       def __len__(      self		)->int:




         '''simple docstring'''





         return self._len



       def __iter__(      self		)->Iterator[KEY]:




         '''simple docstring'''





         yield from (item.key for item in self._buckets if item)







       def __repr__(      self		)->str:




         '''simple docstring'''





         A_      :				Optional[int]		     =					''' ,'''.join(
             F'''{item.key}: {item.val}''' for item in self._buckets if item		)
         return F'''HashMap({val_string})'''








from math import isclose, sqrt


def   _SCREAMING_SNAKE_CASE	( SCREAMING_SNAKE_CASE ,			SCREAMING_SNAKE_CASE ,			SCREAMING_SNAKE_CASE       ):
  A_      :				List[str]		     =					point_y / 4 / point_x
  A_      :				Union[str, Any]		     =					2 * normal_gradient / (1 + normal_gradient * normal_gradient)
  A_      :				int		     =					(1 - normal_gradient * normal_gradient) / (
      1 + normal_gradient * normal_gradient
  )
  A_      :				List[str]		     =					(sa - ca * incoming_gradient) / (ca + sa * incoming_gradient)

  # to find the next point, solve the simultaeneous equations:
  # y^2 + 4x^2 = 100
  # y - b = m * (x - a)
  # ==> A x^2 + B x + C = 0
  A_      :				List[str]		     =					outgoing_gradient**2 + 4
  A_      :				List[str]		     =					2 * outgoing_gradient * (point_y - outgoing_gradient * point_x)
  A_      :				Any		     =					(point_y - outgoing_gradient * point_x) ** 2 - 100

  A_      :				str		     =					(
      -linear_term - sqrt(linear_term**2 - 4 * quadratic_term * constant_term       )
  ) / (2 * quadratic_term)
  A_      :				Any		     =					(
      -linear_term + sqrt(linear_term**2 - 4 * quadratic_term * constant_term       )
  ) / (2 * quadratic_term)

  # two solutions, one of which is our input point
  A_      :				int		     =					x_minus if isclose(SCREAMING_SNAKE_CASE ,			SCREAMING_SNAKE_CASE       ) else x_plus
  A_      :				Any		     =					point_y + outgoing_gradient * (next_x - point_x)

  return next_x, next_y, outgoing_gradient


def   _SCREAMING_SNAKE_CASE	( SCREAMING_SNAKE_CASE = 1.4 ,			SCREAMING_SNAKE_CASE = -9.6       ):
  A_      :				int		     =					0
  A_      :				float		     =					first_x_coord
  A_      :				float		     =					first_y_coord
  A_      :				float		     =					(1_0.1 - point_y) / (0.0 - point_x)

  while not (-0.0_1 <= point_x <= 0.0_1 and point_y > 0):
    A_     ,       A_     ,       A_      :				List[str]		     =					next_point(SCREAMING_SNAKE_CASE ,			SCREAMING_SNAKE_CASE ,			SCREAMING_SNAKE_CASE       )
    num_reflections += 1

  return num_reflections


if __name__ == "__main__":
     print(F'''{solution() = }''')




