結果

問題 No.499 7進数変換
ユーザー kurenai3110
提出日時 2017-04-07 22:22:49
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 314 bytes
コンパイル時間 496 ms
コンパイル使用メモリ 62,716 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-16 00:44:17
合計ジャッジ時間 1,404 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main()
{
	int n; cin >> n;

	vector<int>a;
	while (n) {
		a.push_back(n % 7);
		n /= 7;
	}


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



    return 0;
}

0