Advertisement
GeorgiLukanov87

Substitute

Apr 11th, 2022
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.78 KB | None | 0 0
  1. K = int(input())
  2. L = int(input())
  3. M = int(input())
  4. N = int(input())
  5. condition = False
  6. counter = 0
  7. for a1 in range(K, 8 + 1):
  8.     if condition:
  9.         break
  10.     for a2 in range(9, L - 1, -1):
  11.         if condition:
  12.             break
  13.         for b1 in range(M, 8 + 1):
  14.             if condition:
  15.                 break
  16.             for b2 in range(9, N - 1, -1):
  17.                 if a1 % 2 == 0 and b1 % 2 == 0 and a2 % 2 != 0 and b2 % 2 != 0:
  18.                     if a1 == b1 and a2 == b2:
  19.                         print("Cannot change the same player.")
  20.                     else:
  21.                         print(f"{a1}{a2} - {b1}{b2}")
  22.                         counter += 1
  23.                     if counter == 6:
  24.                         condition = True
  25.                         break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement