We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 869a806 commit c019819Copy full SHA for c019819
0258-add-digits/0258-add-digits.py
@@ -0,0 +1,5 @@
1
+class Solution(object):
2
+ def addDigits(self, num):
3
+ while num > 9:
4
+ num = num % 10 + num // 10
5
+ return num
0 commit comments