Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
141578 | 秦炜杰 | 十进制转d进制 | C++ | 解答错误 | 50 | 0 MS | 252 KB | 215 | 2024-04-06 08:35:58 |
#include<bits/stdc++.h> using namespace std; int main(){ stack<int> st; int n,m; cin>>n>>m; while(n!=0){ st.push(n%m); n/=m; } while(st.size()){ cout<<st.top(); st.pop(); } return 0; }