Skip to content

Commit 0435789

Browse files
authored
Create 66. Plus One.py
1 parent 1a16e0f commit 0435789

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Solution:
2+
def plusOne(self, digits: list[int]) -> list[int]:
3+
return [int(c) for c in str(int("".join(str(d) for d in digits)) + 1)]

0 commit comments

Comments
 (0)