Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
90436 sh25_zhangyj 转进制 C++ 通过 0 MS 252 KB 321 2026-06-05 15:39:55

Tests(2/2):


#include<bits/stdc++.h> using namespace std; char l(int n){ if(0<=n&&n<=9) return '0'+n; else return 'A'+n-10; } void trans(int x,int m){ if(x<m) cout<<l(x); else{ trans(x/m,m); cout<<l(x%m); } } int main(){ int X,M; cin>>X>>M; trans(X,M); return 0; }


测评信息: