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 |
반응형
'python-algorithm' 카테고리의 다른 글
leetcode 2053. Kth Distinct String in an Array (0) | 2022.03.21 |
---|---|
leetcode 2057. Smallest Index With Equal Value (0) | 2022.03.21 |
leetcode 1051. Height Checker (0) | 2022.03.21 |
leetcode 1351. Count Negative Numbers in a Sorted Matrix (0) | 2022.03.20 |
leetcode 290. Word Pattern (0) | 2022.03.17 |
댓글