結果
| 問題 | No.499 7進数変換 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-14 15:47:20 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 435 bytes |
| 記録 | |
| コンパイル時間 | 1,141 ms |
| コンパイル使用メモリ | 182,992 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-04-03 11:30:31 |
| 合計ジャッジ時間 | 1,901 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge3_0 |
| 純コード判定待ち |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main(){
cin.tie(0);
ios::sync_with_stdio(0);
int N; cin >> N;
if(N == 0) cout << 0 << endl, exit(0);
vector<int> ans;
int f = 1;
while(N > 0){
ans.emplace_back(N % 7);
N /= 7;
}
reverse(ans.begin(), ans.end());
for(auto a : ans) cout << a;
cout << endl;
}