




"""simple docstring"""

from __future__ import annotations

from statistics import mean

def 						lowercase_ (						_UpperCAmelCase		):




	"""simple docstring"""






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

def 						lowercase_ (						_UpperCAmelCase					, _UpperCAmelCase		):




	"""simple docstring"""






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


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











"""simple docstring"""

def 						lowercase_ (						_UpperCAmelCase		):




	"""simple docstring"""






	A_					:			Optional[int]						=						9

	while num > 0:
		if num % 10 != digit:
			return False
		num //= 100
		digit -= 1

	return True

def 						lowercase_ (						):




	"""simple docstring"""






	A_					:			Dict						=						1_3890_2663

	while not is_square_form(num * num		):
		if num % 10 == 3:
			num -= 6  # (3 - 6) % 10 = 7
		else:
			num -= 4  # (7 - 4) % 10 = 3

	return num * 10


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





