結果
| 問題 | No.2087 基数の変換 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-30 22:28:45 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 361µs | |
| コード長 | 409 bytes |
| 記録 | |
| コンパイル時間 | 363 ms |
| コンパイル使用メモリ | 94,504 KB |
| 実行使用メモリ | 9,904 KB |
| 最終ジャッジ日時 | 2026-10-06 05:55:56 |
| 合計ジャッジ時間 | 2,813 ms |
|
ジャッジサーバーID (参考情報) |
judge4_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 51 |
ソースコード
#include <iostream>
#include <vector>
#include <iomanip>
#include <algorithm>
using namespace std;
const int initv = 100001;
int main(){
int n,m;
cin >> n >> m;
if(m==0){
cout << 0 << endl;
return 0;
}
vector<int> ans;
while(0<m){
ans.push_back(m%n);
m/=n;
}
reverse(ans.begin(),ans.end());
for(auto x:ans) cout << x;
cout << endl;
}