Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
8443 刘逸杭 十进制转R进制 C++ Wrong Answer 0 MS 256 KB 334 2026-01-11 18:51:44

Tests(1/10):


Code:

#include<bits/stdc++.h> using namespace std; string d_to_r(int a,int b){ string s; while(a){ char c=a%b>9?a%b+'A'-10:a%b+'0'; s=c+s; a/=b; cout<<s<<endl; } if(s=="") s='0'; return s; } int main(){ int r,x; cin>>x>>r; cout<<d_to_r(x,r); return 0; }


Run Info:

------Input------
10001 16
------Answer-----
2711
------Your output-----
1 11 711 2711 2711