結果
問題 |
No.499 7進数変換
|
ユーザー |
|
提出日時 | 2025-04-01 16:39:36 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 819 bytes |
コンパイル時間 | 1,599 ms |
コンパイル使用メモリ | 140,624 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-04-01 16:39:39 |
合計ジャッジ時間 | 2,631 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
#include <iostream> #include <iomanip> #include <vector> #include <math.h> #include <queue> #include <deque> #include <map> #include <set> #include <atcoder/modint> #include <atcoder/dsu> #include <atcoder/fenwicktree> #include <atcoder/lazysegtree> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define all(a) a.begin(), a.end() #define arr(a) a.rbegin(), a.rend() using ll = long long; using mint = atcoder::modint998244353; //using mint = atcoder::modint1000000007; //Konishii int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; string res; if(n == 0) { cout << 0 << endl; return 0; } while(n > 0) { res.push_back(char(n%7+'0')); n /= 7; } reverse(all(res)); cout << res << endl; }