Submission
Status:
PPPPPPPPPP
Score: 100
User: Nathlol2
Problemset: Base Converter
Language: cpp
Time: 0.002 second
Submitted On: 2025-03-16 19:31:55
#include <bits/stdc++.h>
using namespace std;
int32_t main(){
ios::sync_with_stdio(false);
cin.tie(0);
int a, b;
cin >> a >> b;
stack<int> stk;
while(a > 0){
stk.push(a % b);
a /= b;
}
while(stk.size()){
cout << stk.top();
stk.pop();
}
}