提交时间:2023-12-30 10:24:19
运行 ID: 118370
#include<bits/stdc++.h> using namespace std; stack<char>q; char num[11097]={ }; const string ch="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; void asd(int x,int d) { while(x/d!=0) { int sct=x%d; q.push(ch[sct]); x/=d; } } int main() { int x,d; cin>>x>>d; asd(x,d); while(!q.empty()) { cout<<q.top(); q.pop(); } return 0; }