Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: theem1502
Problemset: Base Converter
Language: cpp
Time: 0.002 second
Submitted On: 2026-02-23 22:58:05
#include <bits/stdc++.h>
using namespace std;
int main() {
int num, base;
cin >> num >> base;
string thestring;
int tempbase = base;
while(num != 0) {
thestring += (char)((num % base) + '0');
// cout << "debug " << num << " " << base << "\n";
num /= base;
// base *= tempbase;
}
reverse(thestring.begin(), thestring.end());
cout << thestring;
}