Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: colo39

Problemset: Base Converter

Language: cpp

Time: 0.005 second

Submitted On: 2026-11-28 12:37:49

#include <bits/stdc++.h>
using namespace std;


int main () {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int a,b;
    cin >> a >> b;
    string ans;
    while (a > 0) {
        ans = to_string(a % b) + ans;
        a /= b;
    }
    cout << ans;

    return 0;
}