結果

問題 No.83 最大マッチング
ユーザー kimagureman
提出日時 2016-03-14 15:34:41
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 356 bytes
コンパイル時間 1,216 ms
コンパイル使用メモリ 157,652 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-01 05:16:04
合計ジャッジ時間 1,862 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main(int argc, char** argv)
{
	//1 = 2, 7 = 3
	int n; cin >> n;
	if (n == 2) {
		cout << "1";
	}
	else if (n == 3) {
		cout << "7";
	}
	else {
		if (n%2==0) {
			cout << "1";
		} else {
			cout << "7";
		}
		int keta = (n / 2);
		for (int ii=1; ii<keta; ++ii) {
			cout << "1";
		}
	}
	cout << endl;

}

0