Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Final Stone by wo.tomasz
def final_stone(stones: list[int]) -> int:
while(len(stones)>1):
stones.sort(reverse=True)
b = stones.pop(0)
m = stones.pop(0)
stones.append(b-m)
return stones[0] if stones else 0
Dec. 22, 2022
Comments: