Cjq120326 @ 2024-07-18 16:59:30
代码:
#include<bits/stdc++.h>
using namespace std;
void zhuanhuan(int x, int y) {
string s = "0123456798ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if(x / y != 0) {
zhuanhuan(x / y, y);
}
cout << s[x % y];
}
int main() {
int X, M;
cin >> X >> M;
zhuanhuan(X, M);
return 0;
}
求大佬指教
by LiuXuDong55555 @ 2024-07-18 17:07:01
123456798 你没发现string有什么问题吗?
by Cjq120326 @ 2024-07-20 13:40:04
@LiuXuDong55555 ?样例对的
by LiuXuDong55555 @ 2024-07-20 13:54:38
你改正不就A了吗