信息
- ID
- 943
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 6
- 标签
- 递交数
- 20
- 已通过
- 11
- 上传者
#include<iostream>
#include<math.h>
using namespace std;
typedef long long ll;
ll n,m;
int ws(ll n){
int i=0;
while(n){
i++;
n/=10;
}
return i;
}
void out(ll n){
int x=pow(10,ws(n)-1);
while(x){
cout<<n/x<<" ";
n-=n/x*x;x/=10;
}
cout<<endl;
}
void cz(){
int k=0;
while(n){
k=k*10+n%10;
n/=10;
}
k+=m;
cout<<k;
}
int main(){
cin>>n>>m;
cout<<ws(n)<<endl;
out(n);
cz();
return 0;
}