結果
| 問題 |
No.499 7進数変換
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-22 17:32:52 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 334 bytes |
| コンパイル時間 | 1,409 ms |
| コンパイル使用メモリ | 162,060 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 15:47:02 |
| 合計ジャッジ時間 | 2,491 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
int N,p=1,tmp;
queue<int> s;
cin >> N;
while(N/p/7!=0) p*=7;
while(p!=0){
tmp=N/p;
N=N%p;
p/=7;
s.push(tmp);
}
while(!s.empty()){
cout << s.front();
s.pop();
}
cout << endl;
return 0;
}