結果
| 問題 | No.499 7進数変換 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-03 13:40:06 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 293 bytes |
| コンパイル時間 | 637 ms |
| コンパイル使用メモリ | 67,584 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-14 20:55:36 |
| 合計ジャッジ時間 | 1,628 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main() {
int n;
cin >> n;
string s="";
if(n==0) {
cout << 0 << endl;
return 0;
}
while(n>0) {
s+=to_string(n%7);
n/=7;
}
reverse(s.begin(),s.end());
cout << s << endl;
}