| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 141612 | 黄恩宁 | 十进制转d进制 | C++ | Wrong Answer | 70 | 0 MS | 256 KB | 352 | 2024-04-06 09:00:59 |
#include<iostream> #include<cstdio> #include<stack> using namespace std; stack<int> stk; int main() { int d; long long n; cin>>n>>d; while(n) { stk.push(n%d); n/=d; } if(stk.empty()) cout<<0; while(!stk.empty()) { int x=stk.top(); stk.pop(); if(x>=10) cout<<(char)(x-'0'+'A'); else cout<<x; } return 0; }