結果

問題 No.83 最大マッチング
ユーザー toshiro_yanagi
提出日時 2019-01-11 18:42:05
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 304 bytes
コンパイル時間 491 ms
コンパイル使用メモリ 63,488 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-29 13:42:58
合計ジャッジ時間 1,198 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main()
{
	int n;
	cin >> n;
	bool flg = false;
	int cnt = 0;

	while (n >= 2)
	{
		flg = n == 3 ? true : flg;
		cnt++;
		n -= 2;
	}
	for (int i = 0; i < cnt; i++)
	{
		if (i == 0 && flg)
		{
			printf("7");
			continue;
		}
		printf("1");
	}
	cout << endl;
}
0