while (num != 0){//将p进制的num转化为十进制的j j += (num % 10)*product; num = num / 10; product = product*P; }码片