Spocoman

01. Unique PIN Codes

Jan 1st, 2022 (edited)
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1. x = int(input())
  2. y = int(input())
  3. z = int(input())
  4.  
  5. for i in range(2, x + 1):
  6.     if i == 2 or i == 4 or i == 6 or i == 8:
  7.         for j in range(2, y + 1):
  8.             if j == 2 or j == 3 or j == 5 or j == 7:
  9.                 for k in range(2, z + 1):
  10.                     if k == 2 or k == 4 or k == 6 or k == 8:
  11.                         print(f'{ i} { j} { k}')
  12.  
  13.  
  14. Или:
  15.  
  16. x = int(input())
  17. y = int(input())
  18. z = int(input())
  19.  
  20. for i in range(2, x + 1, 2):
  21.     for j in range(2, y + 1):
  22.         if j == 2 or j == 3 or j == 5 or j == 7:
  23.             for k in range(2, z + 1, 2):
  24.                 print(f'{i} {j} {k}')
  25.  
Add Comment
Please, Sign In to add comment