結果
| 問題 | No.24 数当てゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-24 00:10:26 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 5,000 ms |
| コード長 | 478 bytes |
| コンパイル時間 | 250 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-25 22:01:49 |
| 合計ジャッジ時間 | 1,307 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
import collections
n=int(input())
l=[i for i in range(10)]
nl=[]
for i in range(n):
s=input().split()
if s[4]=="NO":
t=list(map(int,s[:4]))
for j in t:
if j in l:
l.remove(j)
elif s[4]=="YES":
t=list(map(int,s[:4]))
for j in t:
if j in l:
nl.append(j)
if len(l)==1:
print(l[0])
else:
dd = collections.Counter([x for x in nl if x in l])
print(dd.most_common()[0][0])