#include<bits/stdc++.h> using namespace std; int main(){ int n,r,k=0; char a[1001]; cin >> r >> n; while(n!=0){ int t = n%r; if (t<10){ a[k] = t+'0'; } else{ a[k] = t+55; } k++; n = n/r; } for(int i=k-1;i>=0;i--){ cout<<a[i]; }
}
注册一个 XSM 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 XSM 通用账户