Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: Kidmaiok
Problemset: Base Converter
Language: cpp
Time: 0.002 second
Submitted On: 2026-10-13 13:21:43
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define space << ' '
#define nl << endl
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int a,b;
cin >> a >> b;
string ans;
while(a != 0){
ans += to_string(a%b);
a /= b;
}
reverse(ans.begin(),ans.end());
cout << ans;
}