結果
問題 |
No.499 7進数変換
|
ユーザー |
|
提出日時 | 2025-10-07 01:05:36 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 319 bytes |
コンパイル時間 | 2,271 ms |
コンパイル使用メモリ | 195,760 KB |
実行使用メモリ | 7,720 KB |
最終ジャッジ日時 | 2025-10-07 01:05:40 |
合計ジャッジ時間 | 3,103 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); long long int n; string res = ""; cin >> n; if(n==0) { cout << 0 << '\n'; return 0; } while(n > 0) { char c = (char)(n%7 + '0'); n/=7; res = c + res; } cout << res << '\n'; return 0; }