Advertisement
pacho_the_python

Untitled

Jun 24th, 2023
808
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.88 KB | None | 0 0
  1. k = int(input())
  2. l = int(input())
  3. m = int(input())
  4. n = int(input())
  5.  
  6. counter = 0
  7.  
  8. for num_k in range(k, 9):
  9.     if counter == 6:
  10.         break
  11.     for num_l in range(9, l - 1, -1):
  12.         if counter == 6:
  13.             break
  14.         for num_m in range(m, 9):
  15.             if counter == 6:
  16.                 break
  17.             for num_n in range(9, n - 1, -1):
  18.                 if num_k % 2 == 0 and num_m % 2 == 0 and num_l % 2 == 1 and num_n % 2 == 1:
  19.                     first_player = f'{num_k}{num_l}'
  20.                     second_player = f'{num_m}{num_n}'
  21.                     if first_player != second_player:
  22.                         print(f'{first_player} - {second_player}')
  23.                         counter += 1
  24.                         if counter == 6:
  25.                             break
  26.                     else:
  27.                         print("Cannot change the same player.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement