์ฒด๊ฐ Level : โ
โ
โ Review: |
๐ก
import java.util.*;
public class Solution {
public int solution(int n) {
int answer = 0;
int nn = n;
int tmp = 0;
while(nn > 0){
answer += (nn%10);
nn = nn / 10 ;
}
return answer;
}
}