結果

問題 No.2087 基数の変換
ユーザー shauuebbit
提出日時 2022-09-30 22:19:38
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 307 bytes
コンパイル時間 2,209 ms
コンパイル使用メモリ 195,756 KB
最終ジャッジ日時 2025-02-07 19:35:49
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 49 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
    int N, M;
    cin >> N >> M;

    vector<int> ans;

    while (M) {
        ans.push_back(M % N);
        M /= N;
    }

    reverse(ans.begin(), ans.end());

    for (int d : ans) {
        cout << d;
    }
    cout << endl;

    return 0;
}
0