Advertisement
DaniDori

Untitled

Mar 12th, 2023
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. for i in range(100000, 10000, -1):
  2. a = i // 10000
  3. b = i % 10000 // 1000
  4. c = i % 1000 // 100
  5. d = i % 100 // 10
  6. e = i % 10
  7. x = a + c + e
  8. y = b + d
  9. if(max(x, y)>9):
  10. ans = min(x, y)*100+max(x, y)
  11. else:
  12. ans = min(x, y)*10+max(x, y)
  13. if ans == 723:
  14. print(i)
  15. break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement