Submission
Status:
PPPPPPPPPP
Score: 100
User: Cmoss9
Problemset: Base Converter
Language: cpp
Time: 0.002 second
Submitted On: 2025-03-23 16:42:24
#include <bits/stdc++.h>
using namespace std;
int main () {
ios_base::sync_with_stdio(0); cin.tie(NULL);
int num,base;
cin >> num >> base;
string ans = "";
while (num > 0) {
ans += (num%base) + '0';
num /= base;
}
reverse(ans.begin(),ans.end());
cout << ans;
}