[LeetCode] 66. Plus One
Python
class Solution:
def plusOne(self, digits: List[int]) -> List[int]:
digits = list(map(str, digits))
answer = int(''.join(digits))
answer += 1
return list(str(answer))
class Solution:
def plusOne(self, digits: List[int]) -> List[int]:
digits = list(map(str, digits))
answer = int(''.join(digits))
answer += 1
return list(str(answer))
댓글남기기