結果
問題 | No.499 7進数変換 |
ユーザー |
![]() |
提出日時 | 2020-09-14 20:45:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 499 bytes |
コンパイル時間 | 699 ms |
コンパイル使用メモリ | 95,660 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-22 00:55:21 |
合計ジャッジ時間 | 1,615 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <iomanip> #include <stack> #include <algorithm> #include <string> #include <map> #include <iterator> #include <set> #include <queue> #include <bitset> #include <cassert> using namespace std; int main() { int N; cin >> N; string s; while (N > 6) { s += to_string(N%7); N = N/7; } s += to_string(N); reverse(s.begin(),s.end()); cout << s << endl; return 0; }