Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- k_number = int(input())
- l_number = int(input())
- m_number = int(input())
- n_number = int(input())
- first_number_range = range(k_number, 8 + 1, 1)
- second_number_range = range(9, l_number - 1, -1)
- third_number_range = range(m_number, 8 + 1, 1)
- forth_number_range = range(9, n_number - 1, -1)
- valid_change_count = 0
- available_valid_change = True
- for first_number in first_number_range:
- for second_number in second_number_range:
- if first_number % 2 == 0 and second_number % 2 != 0:
- for third_number in third_number_range:
- for forth_number in forth_number_range:
- if third_number % 2 == 0 and forth_number % 2 != 0:
- num_one = str(first_number) + str(second_number)
- num_two = str(third_number) + str(forth_number)
- if num_one == num_two:
- if available_valid_change:
- print("Cannot change the same player.")
- else:
- if valid_change_count >= 6:
- available_valid_change = False
- if available_valid_change:
- print(f"{first_number}{second_number} - {third_number}{forth_number}")
- valid_change_count += 1
Add Comment
Please, Sign In to add comment