2154. Keep Multiplying Found Values by Two

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 2154

class Solution:
    def findFinalValue(self, nums: List[int], original: int) -> int:
        s = set(nums)
        while original in s:
            original <<= 1
        return original