int get(string s,int b){ //字符串s从b进制转为10进制 int res=0; //秦九韶算法 for(auto c:s) res=res*b+c-'0'; return res; }