| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 150137 | fangbaoqinfhgj | K进制数转L进制数 | C++ | Wrong Answer | 0 | 0 MS | 244 KB | 268 | 2024-06-01 15:52:07 |
#include <bits/stdc++.h> using namespace std; string sh(int x,int n){ const string a="0123456789ABCDEF"; string s=""; if(x==0) return "0"; for(;x>0;x/=n) s=a[x%n]+s; return s; } int main(){ int x,n; cin>>x>>n; cout<<sh(x,n)<<endl; return 0; }