Spocoman

04. Car Number

Jan 1st, 2022 (edited)
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. start_num = int(input())
  2. final_num = int(input())
  3.  
  4. for i in range(start_num, final_num + 1):
  5.     for k in range(start_num, final_num + 1):
  6.         for j in range(start_num, final_num + 1):
  7.             for x in range(start_num, final_num + 1):
  8.                 if (i % 2 == 0 and x % 2 == 1 or i % 2 == 1 and x % 2 == 0) and i > x and (k + j) % 2 == 0:
  9.                     print(f'{i}{k}{j}{x}', end=' ')
  10.  
Add Comment
Please, Sign In to add comment