結果
問題 | No.499 7進数変換 |
ユーザー |
|
提出日時 | 2018-05-28 22:18:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 305 bytes |
コンパイル時間 | 562 ms |
コンパイル使用メモリ | 65,588 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-30 07:53:14 |
合計ジャッジ時間 | 1,530 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
#include <iostream>#include <string>using namespace std;int main(int argc, char* argv[]){int N;cin>>N;if (N<7){cout<<N<<endl;return 0;}string s;while (N>=7){int n=N%7;N/=7;s+='0'+n;}s+='0'+N;for (int i=s.length()-1;i>=0;i--){cout<<s[i];}cout<<endl;return 0;}