✔ 문제
✔ 해결
import java.util.*;
public class Solution {
public int solution(int n) {
int answer = 0;
string nStr = "" + n;
String[] strArr = nStr.split("");
for(int i = 0; i < strArr.length; i++) {
answer += Integer.parseInt(strArr[i]);
}
return answer;
}
}