SimeonTs

SUPyF2 Lists-Advanced-Exercise - 02. Big Numbers Lover

Oct 10th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. """
  2. Lists Advanced - Exercise
  3. Check your code: https://judge.softuni.bg/Contests/Practice/Index/1731#1
  4.  
  5. SUPyF2 Lists-Advanced-Exercise - 02. Big Numbers Lover
  6.  
  7. Problem:
  8. You really like big numbers, so you always find a way to form one from numbers given to you
  9. You will receive a single line containing numbers separated by a single space.
  10. Form the biggest number possible from them.
  11.  
  12. Example:
  13. Input:             Output:              Comments:
  14. 3 30 34 5 9        9534303              The numbers sorted are 9 5 34 30 3
  15. 1 2 3              321
  16. """
  17.  
  18. numbers = [number for number in input().split()]
  19. numbers = sorted(numbers, reverse=True)
  20. print("".join(numbers))
Add Comment
Please, Sign In to add comment