Beakjoon&프로그래머스/파이썬
[프로그래머스/파이썬] 자릿수 더하기
현장
2021. 12. 18. 17:53
-코드
def solution(n):
answer = 0
for i in str(n):
answer += int(i)
return answer