728x90
class Solution:
def plusOne(self, digits: List[int]) -> List[int]:
digits = int("".join([str(x) for x in digits]))+1
digits = list(str(digits))
return digits
728x90
'Leetcode' 카테고리의 다른 글
[LeetCode] Climbing Stairs 파이썬 (DP) (0) | 2021.03.30 |
---|---|
[LeetCode] Add Binary 파이썬 (int, bin) (0) | 2021.03.30 |
[LeetCode] Length of Last Word 파이썬 (rstrip, split) (0) | 2021.03.30 |
[LeetCode] Maximum Subarray 파이썬 (dp, local max, global max) (0) | 2021.03.30 |
[LeetCode] Search Insert Position (index) (0) | 2021.03.30 |
댓글