Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. password = int(input())
  2. n1 = password // 100
  3. n2 = password // 10 % 10
  4. n3 = password % 10
  5. first_sum = n1 + n2
  6. second_sum = n2 + n3
  7. if first_sum > second_sum:
  8. print(str(first_sum) + str(second_sum))
  9. elif first_sum < second_sum:
  10. print(str(second_sum) + str(first_sum))
  11. else:
  12. print(str(first_sum) + str(second_sum))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement