| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 89433 | sh25_zhangjiajia | 转进制 | C++ | Accepted | 0 MS | 252 KB | 520 | 2026-06-05 14:23:58 |
#include <iostream> #include <cctype> using namespace std; void decToAny(int x, int m) { if (x == 0) { return; } int remainder = x % m; decToAny(x / m, m); if (remainder >= 10) { cout << (char)('A' + remainder - 10); } else { cout << remainder; } } int main() { int X, M; cin >> X >> M; if (X == 0) { cout << 0 << endl; return 0; } decToAny(X, M); cout << endl; return 0; }