結果

問題 No.83 最大マッチング
ユーザー mitsu__newmitsu__new
提出日時 2018-03-02 12:07:19
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 295 bytes
コンパイル時間 466 ms
コンパイル使用メモリ 52,116 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-30 07:04:07
合計ジャッジ時間 2,444 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 RE -
testcase_02 AC 2 ms
4,376 KB
testcase_03 RE -
testcase_04 AC 1 ms
4,376 KB
testcase_05 RE -
testcase_06 AC 2 ms
4,376 KB
testcase_07 RE -
testcase_08 AC 1 ms
4,380 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
	int N;
	string ans;
	
	cin >> N;
	for(int i=0; i<N/2; i++) ans += '1';  //桁を全部1で埋める
	
	if(N % 2 != 0) {
		ans.insert(ans.begin(), '7');
		ans.erase(ans.begin()+N);
	}

	cout << ans << endl;

	return 0;
}
0