rt。谢谢。
#include<bits/stdc++.h>
#define int long long
using namespace std;
int f(int x){
int y=0;
while(x!=0) y=y*10+x%10,x/=10;
return y;
}
int siz(int x){
int k=0;
while(x!=0) k++,x/=10;
return k;
}
int n,a[1000005],top1,b[1000005],top2;
void print(){
if(top1+top2<=1){
cout<<-1;
exit(0);
}
for(int i=1;i<=top1;i++) cout<<a[i]<<"*";
for(int i=top2;i>1;i--) cout<<b[i]<<"*";
cout<<b[1];
exit(0);
}
bool check(int x){
while(x!=0){
if(x%10==0) return 0;
x/=10;
}
return 1;
}
void dfs(int x){
if(x==1) print();
if(check(x)&&x==f(x)&&top1+top2>1){
a[++top1]=x;
print();
}
for(int i=2;i*i<=x;i++){
if(!(check(i))) continue;
if(x%i==0&&(x/i)%f(i)==0){
a[++top1]=i,b[++top2]=f(i);
dfs(x/i/f(i));
top1--,top2--;
}
}
}
signed main(){
cin>>n;
dfs(n);
print();
return 0;
}