#include <bits/stdc++.h>
using namespace std;
int main(){
int x;
cin >> x;
int temp = x;
int ori = x;
int count = 0;
while(x!=0){
x=x/10;
count++;
}
cout << count << endl;
int sum = 0;
while(temp!=0){
int val = temp%10;
sum += pow(val,count) ;
temp=temp/10;
}
cout << sum <<" "<<ori;
if(sum==ori){
cout << "ok";
}else{
cout << "no";
}
}
登录后提交答案