Skip to content

Commit

Permalink
py解法
Browse files Browse the repository at this point in the history
  • Loading branch information
rinwf committed Sep 18, 2018
1 parent 6d478cb commit cae00b8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lc66. Plus One.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class Solution:
def plusOne(self, digits):
"""
:type digits: List[int]
:rtype: List[int]
"""
return [int(s) for s in list(str(int(''.join([str(x) for x in digits])) + 1))]


digits = [4, 3, 2, 1]
s = Solution()
print(s.plusOne(digits))

0 comments on commit cae00b8

Please sign in to comment.