Advertisement
HristoBaychev

replace

Feb 20th, 2023
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. k = int(input())
  2. l = int(input())
  3. m = int(input())
  4. n = int(input())
  5. count = 0
  6.  
  7. for num1 in range(k, 8+1):
  8.     for num2 in range(9, l-1, -1):
  9.         for num3 in range(m, 8+1):
  10.             for num4 in range(9, n-1, -1):
  11.                 if num1 % 2 == 0 and num2 % 2 != 0 and num3 % 2 == 0 and num4 % 2 != 0:
  12.                     if num1 == num3 and num2 == num4:
  13.                         print('Cannot change the same player')
  14.                     else:
  15.                         print(f'{num1}{num2} - {num3}{num4}')
  16.                         count += 1
  17.                     if count == 6:
  18.                         exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement