Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Phi

Problemset: Base Converter

Language: cpp

Time: 0.002 second

Submitted On: 2026-03-12 11:47:25

#include <bits/stdc++.h>
using namespace std;
int main(){
    stack<int> out;
    int m,k;
    std::cin>>m>>k;
    while(m){
        out.push(m%k);
        m/=k;
    }
    while (!out.empty()) {
        cout << out.top();
        out.pop();
    }

}