Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- answ = 1000000000
- for n in range(1000, 10000):
- s = str(n)
- a = int(s[0]) + int(s[1])
- b = int(s[1]) + int(s[2])
- c = int(s[2]) + int(s[3])
- l = sorted([a, b, c])
- s = str(l[1]) + str(l[2])
- if s == '1517':
- answ = min(answ, n)
- print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement