Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i in range(9999, 1001, -1):
- frst_num = str(i)
- sums = [sum(map(int, c)) for c in zip(frst_num, frst_num[1:])]
- sums.remove(min(sums))
- if str(sorted(sums)[0]) + str(sorted(sums)[1]) == '37':
- print(i)
- break
Add Comment
Please, Sign In to add comment