BbJLeB

04. Number sequence

May 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. # 04. Number sequence
  2. import sys
  3. n = int(input())
  4. max_num = - sys.maxsize -1
  5. min_num = sys.maxsize
  6.  
  7. for num in range(n):
  8.     current_num = int(input())
  9.     if current_num > max_num:
  10.         max_num = current_num
  11.     if current_num < min_num:
  12.         min_num = current_num
  13. print(f"Max number: {max_num}")
  14. print(f"Min number: {min_num}")
Add Comment
Please, Sign In to add comment