結果
| 問題 | No.24 数当てゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-05 13:58:21 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 520 bytes |
| 記録 | |
| コンパイル時間 | 134 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-23 14:22:46 |
| 合計ジャッジ時間 | 961 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)[0][0])
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()