1860. Incremental Memory Leak
Содержание
class Solution:
def memLeak(self, memory1: int, memory2: int) -> List[int]:
i = 1
while i <= max(memory1, memory2):
if memory1 >= memory2:
memory1 -= i
else:
memory2 -= i
i += 1
return [i, memory1, memory2]