結果

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

テストケース

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

ソースコード

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