1
2026-08-22 10:37:17
发布于:广东
1阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int n;
int x;
string l="",s="0123456789ABCDEF";
int main(){
cin>>n>>x;
int i=0;
while(x>=1){
l[i]=s[x%n];
i++;
x/=n;
}
for(int j=i-1;0<=j;j--){
cout<<l[j];
}
}
这里空空如也

有帮助,赞一个