| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 32574 | 王籽易 | 进制转换 | C++ | Accepted | 100 | 0 MS | 252 KB | 339 | 2022-02-12 14:43:46 |
#include<bits/stdc++.h> using namespace std; int x,m,a[100],t=0;//x 10进制数,m 进制,a[]存放处理后的数 char c[16]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};//字典 int main(){ cin>>x>>m; while(x){ a[++t]=x%m; x/=m; } for(int i=t;i>=1;i--){ cout<<c[a[i]]; } return 0; }