提交时间:2024-04-06 08:54:38
运行 ID: 141609
#include<bits/stdc++.h> using namespace std; int n,k; stack <int> t; int main() { cin>>n>>k; while(n!=0) { t.push(n%k); n/=k; } while(!t.empty()) { int f=t.top(); t.pop(); cout<<f; } return 0; }