結果

問題 No.2087 基数の変換
ユーザー eve__fuyuki
提出日時 2024-05-05 14:20:09
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 384 bytes
コンパイル時間 1,871 ms
コンパイル使用メモリ 194,720 KB
最終ジャッジ日時 2025-02-21 11:01:37
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 49 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

void fast_io() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
}

int main() {
    fast_io();
    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 a : ans) {
        cout << a;
    }
    cout << endl;
}
0