Skip to content

Commit f63987e

Browse files
authored
Create Solution2.py
Using built-in functions only
1 parent 2d5d934 commit f63987e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

solution/0066.Plus One/Solution2.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Solution:
2+
def plusOne(self, digits):
3+
"""
4+
:type digits: List[int]
5+
:rtype: List[int]
6+
"""
7+
8+
return list(map(int, str(int("".join(map(str, digits)))+1)))

0 commit comments

Comments
 (0)