코딩테스트
자릿수의 합 구하기
까루카라
2023. 2. 27. 16:48
string 변환해서 한자리씩 다시 int 변환하고 더하기
코드로 구현하면 다음과 같음
for i in str(x):
sum += int(i)