문자열로 변환하고, 뒤에서부터 push_back하면 된다.
#include <string>
#include <vector>
using namespace std;
vector<int> solution(long long n) {
vector<int> answer;
string s = to_string(n);
while(!s.empty()) {
answer.push_back(s.back() - '0');
s.pop_back();
}
return answer;
}