結果

問題 No.499 7進数変換
ユーザー kurenai3110kurenai3110
提出日時 2017-04-07 22:23:21
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 313 bytes
コンパイル時間 443 ms
コンパイル使用メモリ 63,528 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-16 00:48:55
合計ジャッジ時間 1,242 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;

int main()
{
	int n; cin >> n;
	if (n == 0)cout << 0;
	vector<int>a;
	while (n) {
		a.push_back(n % 7);
		n /= 7;
	}


	for (int i = a.size()-1; i >= 0; i--) {
		cout << a[i];
	}
	cout << endl;



    return 0;
}

0