Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
1104 | 关清声 | 十进制转R进制 | C++ | Wrong Answer | 0 MS | 248 KB | 305 | 2023-07-09 16:18:32 |
#include<iostream> using namespace std; int main() { int n; int a; cin>>a>>n; int end[1001]={0},i=0; while(a!=0) { end[i]=a%n; a/=n; i++; } for(int l=i-1;l>=0;l--) { if(end[l]>=10) { cout<<char(end[l]+55); } else { cout<<end[l]; } } return 0; }
------Input------
0 2
------Answer-----
0
------Your output-----