結果
問題 | No.499 7進数変換 |
ユーザー |
![]() |
提出日時 | 2020-04-15 09:45:16 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 252 bytes |
コンパイル時間 | 2,146 ms |
コンパイル使用メモリ | 166,944 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-01 18:40:21 |
合計ジャッジ時間 | 2,211 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){long long N;cin >> N;string ans;while( N ) {ans += (char)(N % 7 + '0');N /= 7;}reverse( ans.begin(), ans.end() );if( ans.size() == 0 ) ans += '0';cout << ans << endl;}