Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
32797 张弛 进制转换 C++ 通过 100 0 MS 256 KB 282 2022-02-25 21:19:44

Tests(7/7):


#include<bits/stdc++.h> using namespace std; char x[202],z[16]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; int a,b,i=1; int main(){ cin>>a>>b; while(a){ x[i++]=z[a%b]; a/=b; } i--; for(int a=i;a>0;a--){ cout<<x[a]; } return 0; }


测评信息: