結果
| 問題 | No.24 数当てゲーム |
| コンテスト | |
| ユーザー |
foumi
|
| 提出日時 | 2019-04-03 12:58:58 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 21 ms / 5,000 ms |
| + 378µs | |
| コード長 | 704 bytes |
| 記録 | |
| コンパイル時間 | 58 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-10-11 01:56:24 |
| 合計ジャッジ時間 | 1,330 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
N = int(input())
yes = []
no = []
for n in range(N):
L = input().split()
if L[-1] == 'YES':
yes.extend(L[0:4])
else:
no.extend(L[0:4])
if len(yes) == 0:
for i in range(10):
if not str(i) in no:
print(i)
elif len(no) != 0:
for n in no:
if n in yes:
yes.remove(n)
count = 0
ans = ''
for i in range(10):
if yes.count(str(i)) > count:
count = yes.count(str(i))
ans = i
print(ans)
else:
count = 1
ans = ''
for i in range(10):
if yes.count(str(i)) > count:
count = yes.count(str(i))
ans = i
print(ans)
foumi