| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 118377 | 沈梓珺 | 十进制转d进制 | C++ | Accepted | 100 | 0 MS | 244 KB | 266 | 2023-12-30 10:29:30 |
#include<bits/stdc++.h> using namespace std; const string s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; int x; void f(int n) { if(n/x==0) { cout<<s[n]; return; } f(n/x); cout<<s[n%x]; } int main() { int n; cin>>n>>x; f(n); return 0; }