from collections import namedtuple

_SCREAMING_SNAKE_CASE     =     namedtuple("""from_to""", """from_ to""")

_SCREAMING_SNAKE_CASE     =     {
    """atm""": from_to(1, 1),
    """pascal""": from_to(0.0000098, 10_1325),
    """bar""": from_to(0.986923, 1.01325),
    """kilopascal""": from_to(0.00986923, 101.325),
    """megapascal""": from_to(9.86923, 0.101325),
    """psi""": from_to(0.068046, 14.6959),
    """inHg""": from_to(0.0334211, 29.9213),
    """torr""": from_to(0.00131579, 760),
}
def 					__lowercase						(    lowerCamelCase__			,					lowerCamelCase__			,					lowerCamelCase__       )					->float:

  '''simple docstring'''




  if from_type not in PRESSURE_CONVERSION:
    raise ValueError(
        f"Invalid 'from_type' value: {from_type!r}  Supported values are:\n"
        + ", ".join(lowerCamelCase__       )       )
  if to_type not in PRESSURE_CONVERSION:
    raise ValueError(
        f"Invalid 'to_type' value: {to_type!r}.  Supported values are:\n"
        + ", ".join(lowerCamelCase__       )       )
  return (
      value * PRESSURE_CONVERSION[from_type].from_ * PRESSURE_CONVERSION[to_type].to
  )


if __name__ == "__main__":
     import doctest

     doctest.testmod()


from __future__ import annotations

from statistics import mean
def 					__lowercase						(    lowerCamelCase__       )					->list[int]:

  '''simple docstring'''




  a__  		=  2
  a__  		=  list(lowerCamelCase__       )
  a__  		=  [0] * len(lowerCamelCase__       )
  a__  		=  0
  while True:
    a__  		=  True
    for i, burst_time in enumerate(lowerCamelCase__       ):
      if rem_burst_times[i] > 0:
        a__  		=  False
        if rem_burst_times[i] > quantum:
          t += quantum
          rem_burst_times[i] -= quantum
        else:
          t += rem_burst_times[i]
          a__  		=  t - burst_time
          a__  		=  0
    if done is True:
      return waiting_times
def 					__lowercase						(    lowerCamelCase__			,					lowerCamelCase__       )					->list[int]:

  '''simple docstring'''




  return [burst + waiting for burst, waiting in zip(lowerCamelCase__			,					lowerCamelCase__       )]


if __name__ == "__main__":
     _SCREAMING_SNAKE_CASE     =     [3, 5, 7]
     _SCREAMING_SNAKE_CASE     =     calculate_waiting_times(burst_times)
     _SCREAMING_SNAKE_CASE     =     calculate_turn_around_times(burst_times, waiting_times)
     print("""Process ID \tBurst Time \tWaiting Time \tTurnaround Time""")
     for i, burst_time in enumerate(burst_times):
          print(
              F"""  {i + 1}\t\t  {burst_time}\t\t  {waiting_times[i]}\t\t  """
              F"""{turn_around_times[i]}"""
          )
     print(F"""\nAverage waiting time = {mean(waiting_times):.5f}""")
     print(F"""Average turn around time = {mean(turn_around_times):.5f}""")

