nq1s788

16

Dec 18th, 2025 (edited)
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. n = int(input())
  2. mx = 0
  3. mn = 20000000
  4. cnt = 0
  5. for i in range(n):
  6.     v = int(input())
  7.     if v > mx:
  8.         mx = v
  9.     if v < mn:
  10.         mn = v
  11.     if v <= 30:
  12.         cnt += 1
  13. print(mx - mn)
  14. print(cnt)
Advertisement
Add Comment
Please, Sign In to add comment