6 lines
95 B
Python
6 lines
95 B
Python
def digitalSum(n):
|
|
if n < 10:
|
|
return n
|
|
else:
|
|
return digitalSum(n//10) + n%10
|