diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -9,4 +9,4 @@
 
 class Solution:
     def getLastMoment(self, n: int, left: List[int], right: List[int]) -> int:
-        return max(max(left, default=0), n - max(right, default=n))
+        return max(max(left, default=0), n - min(right, default=n))
