
"""simple docstring"""
def 					a__ ( a :					List[str]							,  a :					Any							,  a :					Optional[Any]		):

  """simple docstring"""







  assert b != 0, "This cannot accept modulo that is == 0"
  if n == 0:
    return 1

  if n % 2 == 1:
    return (bin_exp_mod(a							,  n - 1							,  a		) * a) % b

  _snake_case  :    Union[str, Any]            = bin_exp_mod(a							,  n / 2							,  a		)
  return (r * r) % b


if __name__ == "__main__":
    try:
        _a   :      str       =				int(input("""Enter Base : """).strip())
        _a   :      Union[str, Any]       =				int(input("""Enter Power : """).strip())
        _a   :      Union[str, Any]       =				int(input("""Enter Modulo : """).strip())
    except ValueError:
        print("""Invalid literal for integer""")

    print(bin_exp_mod(BASE, POWER, MODULO))



"""simple docstring"""
from __future__ import annotations

from statistics import mean
def 					a__ ( a :					list[int]		):

  """simple docstring"""







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

  """simple docstring"""







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


if __name__ == "__main__":
    _a   :      Dict       =				[3, 5, 7]
    _a   :      Dict       =				calculate_waiting_times(burst_times)
    _a   :      Tuple       =				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}')

