Advertisement
SimeonTs

SUPyF Lists - Extra 02. Smallest Element in Array

Jun 15th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. """
  2. Lists
  3. Check your answer: https://judge.softuni.bg/Contests/Practice/Index/426#1
  4.  
  5. 02. Smallest Element in Array
  6.  
  7. Problem:
  8. Read a list of integers on the first line of the console. After that, find the smallest item in the list
  9. and print it on the console.
  10. Examples:
  11. Input                   Output
  12. 1 2 3 4 5               1
  13. 9 8 7 82 78 13          7
  14. 78 77 1268 43 9         9
  15. """
  16.  
  17. nums = [int(item) for item in input().split(" ")]
  18. print(min(nums))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement