結果
| 問題 |
No.499 7進数変換
|
| ユーザー |
ndifix
|
| 提出日時 | 2017-04-07 22:35:32 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 344 bytes |
| コンパイル時間 | 456 ms |
| コンパイル使用メモリ | 65,300 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-16 01:04:27 |
| 合計ジャッジ時間 | 1,257 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 28 WA * 3 |
ソースコード
#include <iostream>
#include <cmath>
#include <vector>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> v;
if(n==0){
cout << 0 << endl;
return 0;
}
while(n){
v.push_back(n%7);
n /= 7;
}
int a=0;
for(int i=0; i<v.size(); i++){
a += pow(10, i) * v[i];
}
cout << a << endl;
return 0;
}
ndifix