解题思路:
注意事项:
参考代码:
n = input() def to_ten(x): dic = {'A':10,'B':11,'C':12,'D':13,'E':14,'F':15} dic2= {str(i):i for i in range(10)} for i in dic2: dic[i]=dic2[i] s = 0 b = 0 for i in x[::-1]: s += int(dic[i])*(16**b) b += 1 return s print(to_ten(n))
0.0分
0 人评分