2 parents 48b3eb2 + 6a122e9 commit 6b937cbCopy full SHA for 6b937cb
1 file changed
leetcode3/최민지/1837.py
@@ -0,0 +1,8 @@
1
+class Solution:
2
+ def sumBase(self, n: int, k: int) -> int:
3
+ result = 0
4
+ while n > 0:
5
+ result += n % k
6
+ n = n // k
7
+ return result
8
+
0 commit comments