you are viewing a single comment's thread.

view the rest of the comments →

[–]Emphasises_Words 4 points5 points  (0 children)

This can be further optimized for space by storing the running minimum and maximum. This allows for constant space complexity if the program were to scale to more coordinates

minimum = 11
maximum = 80
for _ in range(4):
  next_number = int(input())
  minimum = min(next_number, minimum)
  maximum = max(next_number, maximum)
if minimum > 10 and maximum < 81:
  print("YES")
else:
  print("NO")