#include<bits/stdc++.h>
using namespace std;
int jinzhi(int x,int b){
int sum=0,value=1;
while(x!=0){
if(x%10>=b){
return 9999999999;
}
sum+=((x%10)*value);
value*=b;
x=x/10;
}
return sum;
}
int main(){
int a,b,c;
cin>>a>>b>>c;
for(int i=2;i<=16;i++){
if(jinzhi(a,i)*jinzhi(b,i)==jinzhi(c,i)){
cout<<i<<endl;
return 0;
}
}
cout<<0;
return 0;
}
求助,90分代码(确定进制 B2141)