結果

問題 No.24 数当てゲーム
ユーザー k0825k0825
提出日時 2019-03-04 16:52:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 499 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 10,784 KB
実行使用メモリ 8,232 KB
最終ジャッジ日時 2023-09-05 18:05:54
合計ジャッジ時間 970 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,864 KB
testcase_01 AC 16 ms
7,792 KB
testcase_02 AC 15 ms
8,180 KB
testcase_03 WA -
testcase_04 AC 16 ms
8,188 KB
testcase_05 AC 15 ms
8,176 KB
testcase_06 AC 16 ms
8,120 KB
testcase_07 AC 16 ms
8,232 KB
testcase_08 AC 16 ms
8,116 KB
testcase_09 AC 15 ms
8,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
yes = []
no = []
y_flag = 0
n_flag = 0
for i in range(n):
	a = input().split()
	if a[-1] == 'YES':
		yes.extend(a[:-1])
		y_flag += 1
	else:
		no.extend(a[:-1])
		n_flag += 1
if y_flag == 0:
	print(''.join([str(i) for i in range(0, 10) if str(i) not in no]))
elif n_flag == 0:
	print(''.join([_ for _ in set(yes) if yes.count(_) > 1]))
else:
	if y_flag > 1: yes = [_ for _ in set(yes) if yes.count(_) > 1]
	for i in range(len(yes)):
		if yes[i] not in no:
			print(yes[i])
			exit()
0