結果
問題 | No.24 数当てゲーム |
ユーザー |
|
提出日時 | 2021-04-01 15:19:55 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 5,000 ms |
コード長 | 474 bytes |
コンパイル時間 | 240 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-17 19:09:45 |
合計ジャッジ時間 | 1,082 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
n = int(input()) yes = [] no = [] ans = set(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']) for _ in range(n): a, b, c, d, r = input().split() l = [a, b, c, d] if r == 'NO': for i in l: no.append(i) else: yes.append(l) for i in yes: ans = ans & set(i) ans = list(ans) no = list(set(no)) if len(ans) == 1: print(ans[0]) exit() else: for j in no: if j in ans: ans.remove(j) print(ans[0])