






"""simple docstring"""


def    lowerCAmelCase							(       __UpperCamelCase					):




  """simple docstring"""







  if not isinstance(__UpperCamelCase						,			__UpperCamelCase					):
    __A		     =					(
        '''operation can not be conducted on a object of type '''
        f'{type(__UpperCamelCase					).__name__}'
    )
    raise TypeError(__UpperCamelCase					)
  __A		     =					''''''
  for _ in range(0						,			3_2					):
    bit_string += str(number % 2					)
    __A		     =					number >> 1
  return bit_string



def    lowerCAmelCase							(       __UpperCamelCase					):




  """simple docstring"""







  if number < 0:
    raise ValueError('''the value of input must be positive'''					)
  elif isinstance(__UpperCamelCase						,			__UpperCamelCase					):
    raise TypeError('''Input value must be a \'int\' type'''					)
  elif isinstance(__UpperCamelCase						,			__UpperCamelCase					):
    raise TypeError('''\'<\' not supported between instances of \'str\' and \'int\''''					)
  __A		     =					0
  # iterator over [1 to 32],since we are dealing with 32 bit integer
  for _ in range(1						,			3_3					):
    # left shift the bits by unity
    __A		     =					result << 1
    # get the end bit
    __A		     =					number % 2
    # right shift the bits by unity
    __A		     =					number >> 1
    # add that bit to our ans
    __A		     =					result | end_bit
  return get_reverse_bit_string(__UpperCamelCase					)


if __name__ == "__main__":
       import doctest

       doctest.testmod()





from __future__ import annotations

from statistics import mean

def   a_					(_lowerCAmelCase  :   list[int]       )->				list[int]:
    snake_case:						Tuple         =   2
    snake_case:						str         =   list(_lowerCAmelCase       )
    snake_case:						Union[str, Any]         =   [0] * len(_lowerCAmelCase       )
    snake_case:						List[Any]         =   0
    while True:
        snake_case:						Optional[int]         =   True
        for i, burst_time in enumerate(_lowerCAmelCase       ):
            if rem_burst_times[i] > 0:
                snake_case:						Dict         =   False
                if rem_burst_times[i] > quantum:
                    t += quantum
                    rem_burst_times[i] -= quantum
                else:
                    t += rem_burst_times[i]
                    snake_case:						Optional[Any]         =   t - burst_time
                    snake_case:						Tuple         =   0
        if done is True:
            return waiting_times

def   a_					(_lowerCAmelCase  :   list[int]			,	_lowerCAmelCase  :   list[int]       )->				list[int]:
    return [burst + waiting for burst, waiting in zip(_lowerCAmelCase			,	_lowerCAmelCase       )]


if __name__ == "__main__":
    __lowerCAmelCase    :  List[Any]										= [3, 5, 7]
    __lowerCAmelCase    :  List[Any]										= calculate_waiting_times(burst_times)
    __lowerCAmelCase    :  str										= 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}""")


