結果
| 問題 | No.24 数当てゲーム | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-03-05 13:54:42 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 514 bytes | 
| コンパイル時間 | 255 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-06-23 14:22:39 | 
| 合計ジャッジ時間 | 1,261 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 9 WA * 1 | 
ソースコード
from collections import Counter
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
c = Counter(yes)
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(c.most_common(1))
else:
	if y_flag > 1: yes = [i for i in set(yes) if yes.count(i) > 1]
	for i in range(len(yes)):
		if yes[i] not in no:
			print(yes[i])
			exit()
            
            
            
        