#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#define ll long long
using namespace std;
ll n;
int r;
char a[]="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char b[]="";
int main(){
scanf("%lld%d", &n, &r);
int cnt = 0;
while(n > 0){
int i = n % r;
b[cnt++] = a[i];
n /= r;
}
for(int i=cnt-1; i>=0; i--){
printf("%c", b[i]);
}
return 0;
}
为啥样例能过,我自己敲的转16进制的也能过,提交就全wa啊