





from __future__ import annotations

from statistics import mean






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






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


if __name__ == "__main__":
       UpperCamelCase__          =[3, 5, 7]
       UpperCamelCase__          =calculate_waiting_times(burst_times)
       UpperCamelCase__          =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 sys

sys.set_int_max_str_digits(0)  # type: ignore






def 			lowerCamelCase__	(__lowerCamelCase		):
     _SCREAMING_SNAKE_CASE				:		int  			=							[0] * 11
     _SCREAMING_SNAKE_CASE				:		Optional[Any]  			=							[0] * 11

     # mark last 9 numbers
     for _ in range(9		):
          _SCREAMING_SNAKE_CASE				:		Optional[Any]  			=							1
          _SCREAMING_SNAKE_CASE				:		str  			=							number // 10
     # flag
     _SCREAMING_SNAKE_CASE				:		int  			=							True

     # check last 9 numbers for pandigitality

     for x in range(9		):
          if not check_last[x + 1]:
               _SCREAMING_SNAKE_CASE				:		Any  			=							False
     if not f:
          return f

     # mark first 9 numbers
     _SCREAMING_SNAKE_CASE				:		str  			=							int(str(__lowerCamelCase		)[:9]		)

     for _ in range(9		):
          _SCREAMING_SNAKE_CASE				:		str  			=							1
          _SCREAMING_SNAKE_CASE				:		List[Any]  			=							number // 10

     # check first 9 numbers for pandigitality

     for x in range(9		):
          if not check_front[x + 1]:
               _SCREAMING_SNAKE_CASE				:		Any  			=							False
     return f






def 			lowerCamelCase__	(__lowerCamelCase		):
     _SCREAMING_SNAKE_CASE				:		List[str]  			=							[0] * 11

     # mark last 9 numbers
     for _ in range(9		):
          _SCREAMING_SNAKE_CASE				:		Dict  			=							1
          _SCREAMING_SNAKE_CASE				:		List[str]  			=							number // 10
     # flag
     _SCREAMING_SNAKE_CASE				:		List[Any]  			=							True

     # check last 9 numbers for pandigitality

     for x in range(9		):
          if not check_last[x + 1]:
               _SCREAMING_SNAKE_CASE				:		str  			=							False
     return f






def 			lowerCamelCase__	():
     _SCREAMING_SNAKE_CASE				:		Dict  			=							1
     _SCREAMING_SNAKE_CASE				:		Union[str, Any]  			=							1
     _SCREAMING_SNAKE_CASE				:		List[str]  			=							2
     # temporary Fibonacci numbers

     _SCREAMING_SNAKE_CASE				:		Any  			=							1
     _SCREAMING_SNAKE_CASE				:		List[str]  			=							1
     _SCREAMING_SNAKE_CASE				:		str  			=							2
     # temporary Fibonacci numbers mod 1e9

     # mod m=1e9, done for fast optimisation
     _SCREAMING_SNAKE_CASE				:		Optional[Any]  			=							[0] * 1000000
     _SCREAMING_SNAKE_CASE				:		Optional[int]  			=							1000000000

     for x in range(1000000		):
          _SCREAMING_SNAKE_CASE				:		Union[str, Any]  			=							(aa + ba) % m
          _SCREAMING_SNAKE_CASE				:		int  			=							ba % m
          _SCREAMING_SNAKE_CASE				:		List[str]  			=							ca % m
          if checka(__lowerCamelCase		):
               _SCREAMING_SNAKE_CASE				:		List[Any]  			=							1

     for x in range(1000000		):
          _SCREAMING_SNAKE_CASE				:		Any  			=							a + b
          _SCREAMING_SNAKE_CASE				:		Dict  			=							b
          _SCREAMING_SNAKE_CASE				:		int  			=							c
          # perform check only if in tocheck
          if tocheck[x + 3] and check(__lowerCamelCase		):
               return x + 3  # first 2 already done
     return -1


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