文章
55
粉丝
100
获赞
12
访问
29.7k
#include<stdio.h>
#include<string.h>
#include<string>
#include<algorithm>
#include<iostream>
using namespace std;
int main(){
int n ;
cin>>n;
int sum = 0;
int t = 10;
int count = 0;
int arr[1000] = {0};
int k = 0;
while(n!=0){
int remain = n%10;
arr[k++] = remain;
sum = sum*t + remain;
n/=10;
count++;
}
cout<<count<<endl;
for(int i = k-1; i>=0; i--){
cout<<arr[i]<<" ";
}
cout<<endl;
cout<<sum;
// system("pause");
}
登录后发布评论
暂无评论,来抢沙发