Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
87435 sh25_wuyy 转进制 C++ 通过 1 MS 248 KB 259 2026-04-18 09:41:35

Tests(2/2):


#include<iostream> using namespace std; char num[16]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; void turn(int n,int k){ if(n>=k){ turn(n/k,k); }cout<<num[n%k]; }int main(){ int x,m; cin>>x>>m; turn(x,m); return 0; }


测评信息: