Submission
Status:
PPPPPPPPPP
Score: 100
User: Test
Problemset: Base Converter
Language: cpp
Time: 0.003 second
Submitted On: 2025-03-26 09:14:10
#include <bits/stdc++.h>
using namespace std;
void baseconverter(int n,int base){
stack<int> b;
while(n!=0){
b.push(n%base);
n = n/base;
}
while(!b.empty()){
cout << b.top();
b.pop();
}
}
int main(){
int n,base;
cin >> n >> base;
baseconverter(n,base);
}