본문 바로가기
python-algorithm

leetcode 2154. Keep Multiplying Found Values by Two

by 무적김두칠 2022. 3. 21.

1
2
3
4
5
class Solution:
    def findFinalValue(self, nums: List[int], original: int-> int:
        for i in range(len(nums)):
            if original in nums: original*=2
        return original
cs
반응형

댓글