結果
問題 |
No.2087 基数の変換
|
ユーザー |
![]() |
提出日時 | 2022-09-30 21:23:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 1,619 ms |
コンパイル使用メモリ | 169,208 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-22 22:03:13 |
合計ジャッジ時間 | 3,017 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 49 WA * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int N, M; cin >> N >> M; vector<int> ans; while (M > 0){ ans.push_back(M % N); M /= N; } reverse(ans.begin(), ans.end()); int L = ans.size(); for (int i = 0; i < L; i++){ cout << ans[i]; } cout << endl; }