Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i in range(100000, 10000, -1):
- a = i // 10000
- b = i % 10000 // 1000
- c = i % 1000 // 100
- d = i % 100 // 10
- e = i % 10
- x = a + c + e
- y = b + d
- if(max(x, y)>9):
- ans = min(x, y)*100+max(x, y)
- else:
- ans = min(x, y)*10+max(x, y)
- if ans == 723:
- print(i)
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement