Advertisement
Spocoman

03. Lucky Numbers

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