文章
84
粉丝
408
获赞
33
访问
872.1k
#include<iostream>
#include<vector>
using namespace std;
int main()
{
int num;
cin >> num;
vector<int> vct;
while (num > 0) {
int tmp = num%10;
vct.push_back(tmp);
num /= 10;
}
cout << vct.size() << endl;
for (int i = vct.size()-1; i > 0; i--)
cout << vct[i] << " ";
cout << vct[0] << endl;
for (int i = 0; i < vct.size(); i++)
cout << vct[i];
cout << endl;
return 0;
}
登录后发布评论
暂无评论,来抢沙发