fork download
  1. import math
  2. maxv=0
  3. minv=math.inf
  4. for i in range(1,9):
  5. x=int(input())
  6. if x>0:
  7. if x>maxv:
  8. maxv=x
  9. if x<minv:
  10. minv=x
  11. print(maxv)
  12. print(minv)
Success #stdin #stdout 0.02s 9240KB
stdin
0
0
7
0
-1
-5
-2
-7
stdout
7
7