Advertisement
Spocoman

07. Min Number

Dec 27th, 2021 (edited)
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. import sys
  2.  
  3. command = input()
  4. min_num = sys.maxsize
  5.  
  6. while command != 'Stop':
  7.     current = int(command)
  8.     if min_num > current:
  9.         min_num = current
  10.     command = input()
  11.  
  12. print(min_num)
  13.  
  14. Решение с масив:
  15.  
  16. numbers = []
  17. command = input()
  18.  
  19. while command != 'Stop':
  20.     numbers.append(int(command))
  21.     command = input()
  22.  
  23. print(min(numbers))
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement