Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- control_unit = int(input())
- password = ''
- counter = 0
- is_found = False
- for a in range(1, 10):
- for b in range(1, 10):
- for c in range(1, 10):
- for d in range(1, 10):
- if (a * b) + (c * d) == control_unit:
- if a < b:
- if c > d:
- print(f'{a}{b}{c}{d}', end=" ")
- counter += 1
- if counter == 4:
- password = str(f'{a}{b}{c}{d}')
- is_found = True
- print()
- if is_found:
- print(f'Password: {password}')
- else:
- print('No!')
Advertisement
Add Comment
Please, Sign In to add comment