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

Tests(0/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; } return s; } int main(){ int r,x; cin>>x>>r; cout<<d_to_r(x,r); return 0; }


Run Info:

------Input------
0 2
------Answer-----
0
------Your output-----