1 条题解

  • 1
    @ 2023-3-31 20:30:59
    #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;
    }
    
    • 1

    信息

    ID
    943
    时间
    1000ms
    内存
    128MiB
    难度
    9
    标签
    递交数
    11
    已通过
    6
    上传者