80分求救
查看原帖
80分求救
1404193
mikeLD楼主2024/8/22 11:44
#include<bits/stdc++.h>
using namespace std;
stack <int> s;
stack<char> s1;
int main(){
int n,m;
cin>>n>>m;
while (n!=0){
s.push(n%m);
n=n/m;
}
while(!s.empty()){
cout<<s.top();	
s.pop();
}
return 0;
}
2024/8/22 11:44
加载中...