Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- answ = 0
- for a in range(1, 10):
- for b in range(10):
- for c in range(10):
- for d in range(10):
- x = a + b
- y = c + d
- if x < y:
- if str(x) + str(y) == '117':
- answ = max(answ, a * 1000 + b * 100 + c * 10 + d)
- else:
- if str(y) + str(x) == '117':
- answ = max(answ, a * 1000 + b * 100 + c * 10 + d)
- print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement