Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
323985 王栎州 【C6-2】10进制转D进制 C++ 通过 100 2 MS 264 KB 277 2025-05-24 13:08:26

Tests(5/5):


#include <bits/stdc++.h> using namespace std; int main() { int n,r; string s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string s1; cin>>n>>r; if(n==0&&r==2) cout<<0; while(n!=0){ s1=s[n%r]+s1; n=n/r; } cout<<s1; return 0; }


测评信息: