Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Kx

Problemset: Base Converter

Language: cpp

Time: 0.003 second

Submitted On: 2026-03-20 11:07:23

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

int main() {
    int n, b; cin >> n >> b;

    string s = "";
    while(n != 0) {
        int i = n % b;
        char c  = i + '0';
        s.insert(s.begin(), c);

        n /= b;
    }

    cout << s << '\n';

    return 0;
}