| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 138489 | 冯诚阳 | R进制转十进制 | C++ | Accepted | 0 MS | 284 KB | 358 | 2025-11-24 21:10:12 |
#include <iostream> #include <cstring> #include <cmath> using namespace std; int main(){ char str[64]; int r; cin>>r>>str; long long len=strlen(str),s=0,x=0; for(int i=len-1;i>=0;i--){ if(str[i]>='A') str[i]-=7; s+=(str[i]-'0')*pow(r,x); x++; } cout<<s; return 0; }