Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
106211 | 丁俊杰 | R进制转十进制 | Python3 | Accepted | 44 MS | 3780 KB | 246 | 2025-01-15 17:09:52 |
a="0123456789ABCDEF" d={} for i ,j in enumerate(a): d[j]=i def R_to_Ten(R,X): res=0 X=X[::-1] for i in range(len(X)): res+=d[X[i]]*R**i return res R,X=input().split() R=int(R) print(R_to_Ten(R,X))