提交时间:2023-12-30 08:12:25
运行 ID: 118342
#include<bits/stdc++.h> using namespace std; const string s = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; int n , m; void work(int x) { if(x / m == 0) { cout << s[x]; return; } work(x / m); cout << s[x % m]; } int main() { cin >> n >> m; work(n); return 0; }