static int get (char[] s, int b) {
int res = 0;
for (char c : s) {
res = res * b + (c - '0');
}
return res;
}
b进制转10进制模板
猜你喜欢
转载自blog.csdn.net/qq_52237775/article/details/129391612
今日推荐
周排行