結果

問題 No.632 穴埋め門松列
ユーザー zishuzemi3215zishuzemi3215
提出日時 2018-04-04 13:34:28
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 428 bytes
コンパイル時間 602 ms
コンパイル使用メモリ 25,044 KB
実行使用メモリ 4,508 KB
最終ジャッジ日時 2023-09-08 15:48:45
合計ジャッジ時間 827 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<cstdio>
#include<cstdlib>
int main(void) {
	char a, b, c;
	int A, B, C;
	scanf("%c%c%c", &a,&b,&c);


	if (a == '?') {
		B = atoi(&b);
		C = atoi(&c);
		if ((1 - B)*(C - B) > 0) { printf("1"); }
		else { printf("4"); }
	}
	else if (b == '?') {
		printf("14");
	}
	else if (c == '?') {

		A = atoi(&a);
		B = atoi(&b);

		if ((1 - B)*(A - B) > 0) { printf("1"); }
		else { printf("4"); }
	}

	printf("\n");

	return 0;
}
0