


from __future__ import annotations

from statistics import mean






def    _UpperCAmelCase	(   __lowerCamelCase       )		->list[int]:


	'''simple docstring'''
	snake_case   : str	  =      2
	snake_case   : Any	  =      list(__lowerCamelCase       )
	snake_case   : Dict	  =      [0] * len(__lowerCamelCase       )
	snake_case   : Optional[Any]	  =      0
	while True:
		snake_case   : str	  =      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   : Dict	  =      t - burst_time
					snake_case   : List[str]	  =      0
		if done is True:
			return waiting_times






def    _UpperCAmelCase	(   __lowerCamelCase ,     __lowerCamelCase       )		->list[int]:


	'''simple docstring'''
	return [burst + waiting for burst, waiting in zip(__lowerCamelCase ,     __lowerCamelCase       )]


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










import math






def    _UpperCAmelCase	(   __lowerCamelCase       )		->str:


 '''simple docstring'''
 if number == 0:
  snake_case   : str	  =      '''Zero'''
  return words
 else:
  snake_case   : List[str]	  =      math.logaa(__lowerCamelCase       )
  snake_case   : List[Any]	  =      digits + 1
  snake_case   : List[str]	  =      {}
  snake_case   : Optional[int]	  =      ''''''
  snake_case   : Union[str, Any]	  =      '''One'''
  snake_case   : str	  =      '''Two'''
  snake_case   : Dict	  =      '''Three'''
  snake_case   : Dict	  =      '''Four'''
  snake_case   : int	  =      '''Five'''
  snake_case   : Optional[Any]	  =      '''Six'''
  snake_case   : Optional[Any]	  =      '''Seven'''
  snake_case   : Tuple	  =      '''Eight'''
  snake_case   : Dict	  =      '''Nine'''

  snake_case   : Tuple	  =      {}
  snake_case   : List[str]	  =      ''''''
  snake_case   : Tuple	  =      '''Twenty'''
  snake_case   : Optional[int]	  =      '''Thirty'''
  snake_case   : Optional[Any]	  =      '''Forty'''
  snake_case   : str	  =      '''Fifty'''
  snake_case   : int	  =      '''Sixty'''
  snake_case   : Optional[int]	  =      '''Seventy'''
  snake_case   : Dict	  =      '''Eighty'''
  snake_case   : List[str]	  =      '''Ninety'''

  snake_case   : List[str]	  =      {}
  snake_case   : int	  =      '''Ten'''
  snake_case   : Union[str, Any]	  =      '''Eleven'''
  snake_case   : Dict	  =      '''Twelve'''
  snake_case   : Any	  =      '''Thirteen'''
  snake_case   : str	  =      '''Fourteen'''
  snake_case   : Optional[int]	  =      '''Fifteen'''
  snake_case   : Any	  =      '''Sixteen'''
  snake_case   : List[Any]	  =      '''Seventeen'''
  snake_case   : List[str]	  =      '''Eighteen'''
  snake_case   : Tuple	  =      '''Nineteen'''

  snake_case   : Tuple	  =      {}
  snake_case   : List[Any]	  =      '''Hundred,'''
  snake_case   : Tuple	  =      '''Thousand,'''
  snake_case   : List[Any]	  =      '''Lakh,'''
  snake_case   : Union[str, Any]	  =      '''Crore,'''

  snake_case   : int	  =      number
  snake_case   : List[Any]	  =      ''''''
  snake_case   : Optional[int]	  =      0
  snake_case   : Optional[int]	  =      int(__lowerCamelCase       )
  while counter < digits:
   snake_case   : Optional[Any]	  =      temp_num % 10
   if counter % 2 == 0:
    snake_case   : int	  =      ''''''
    if counter in placevalue and current != 0:
     snake_case   : Any	  =      placevalue[counter]
    if counter == 2:
     snake_case   : str	  =      singles[current] + addition + words
    elif counter == 0:
     if ((temp_num % 100) // 10) == 1:
      snake_case   : Tuple	  =      teens[current] + addition + words
      snake_case   : Optional[int]	  =      temp_num // 10
      counter += 1
     else:
      snake_case   : Union[str, Any]	  =      singles[current] + addition + words

    else:
     snake_case   : List[str]	  =      doubles[current] + addition + words

   else:
    if counter == 1:
     if current == 1:
      snake_case   : str	  =      teens[number % 10] + words
     else:
      snake_case   : Tuple	  =      ''''''
      if counter in placevalue:
       snake_case   : Optional[int]	  =      placevalue[counter]
      snake_case   : List[Any]	  =      doubles[current] + addition + words
    else:
     snake_case   : List[str]	  =      ''''''
     if counter in placevalue:
      if current == 0 and ((temp_num % 100) // 10) == 0:
       snake_case   : Dict	  =      ''''''
      else:
       snake_case   : List[Any]	  =      placevalue[counter]
     if ((temp_num % 100) // 10) == 1:
      snake_case   : int	  =      teens[current] + addition + words
      snake_case   : Dict	  =      temp_num // 10
      counter += 1
     else:
      snake_case   : Optional[int]	  =      singles[current] + addition + words
   counter += 1
   snake_case   : Optional[int]	  =      temp_num // 10
 return words


if __name__ == "__main__":
  import doctest

  doctest.testmod()






