結果
問題 | No.24 数当てゲーム |
ユーザー |
|
提出日時 | 2017-10-01 18:32:19 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 5,000 ms |
コード長 | 372 bytes |
コンパイル時間 | 252 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-15 21:36:54 |
合計ジャッジ時間 | 1,046 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
def main(): N = int(input()) yes_nums = set(range(9 + 1)) no_nums = set() for _ in range(N): x = input().split() nums = map(int, x[:-1]) if x[-1] == "YES": yes_nums &= set(nums) else: no_nums.update(nums) fixed = yes_nums - no_nums print(fixed.pop()) if __name__ == '__main__': main()