[해설]
class Solution {
public int[] solution(long n) {
String str = String.valueOf(n);
int[] answer = new int[str.length()];
int index = 0;
while( n>= 1) {
int extra = (int) (n % 10);
answer[index] = extra;
n/= 10;
index++;
}
return answer;
}
}