結果

問題 No.499 7進数変換
ユーザー rtomp
提出日時 2017-05-30 15:21:39
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 226 bytes
コンパイル時間 1,286 ms
コンパイル使用メモリ 161,860 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-21 19:20:09
合計ジャッジ時間 2,775 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;
int main()
{
	int n;	cin >> n;	
	vector<int> ans;

	do ans.push_back(n % 7);
	while (n /= 7);

	reverse(begin(ans), end(ans));

	for (auto num : ans) cout << num;

	cout << endl;
}
0