結果

問題 No.83 最大マッチング
ユーザー Maeda
提出日時 2025-03-07 14:24:24
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 302 bytes
コンパイル時間 608 ms
コンパイル使用メモリ 25,216 KB
実行使用メモリ 8,608 KB
最終ジャッジ日時 2025-03-07 14:24:26
合計ジャッジ時間 1,454 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

void main(void){
	int matchstick = 0;
	int input = scanf("%d\n",&matchstick);
	if(matchstick  == 3){
		printf("%d",7);
	}else{
		int numCount = matchstick/2;
		if(matchstick%2 != 0){
			printf("7");
			numCount--;
		}
		for(int i = 0;i < numCount ; i++){
			printf("%d",1);
		}
	}
}
0