結果
| 問題 | No.499 7進数変換 |
| コンテスト | |
| ユーザー |
AREIDO2
|
| 提出日時 | 2017-05-16 11:24:35 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 409 bytes |
| コンパイル時間 | 890 ms |
| コンパイル使用メモリ | 67,076 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-16 16:14:21 |
| 合計ジャッジ時間 | 1,927 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include<iostream>
#include<string>
#include<iomanip>
#include<vector>
using namespace std;
int main(){
int x,count=1,calc=1;
std::vector<int> y;
cin >> x;
while(x>=calc*7)
calc*=7;
while(calc >= 7){
y.push_back(x/calc);
x-=(x/calc)*calc;
calc/=7;
count++;
}
y.push_back(x);
for(int i=0;i<count;i++)
cout << y[i];
cout << "\n";
return 0;
}
AREIDO2