結果
問題 | No.24 数当てゲーム |
ユーザー |
|
提出日時 | 2019-03-04 16:52:09 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 5,000 ms |
コード長 | 499 bytes |
コンパイル時間 | 101 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-23 13:35:04 |
合計ジャッジ時間 | 931 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
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 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(''.join([_ for _ in set(yes) if yes.count(_) > 1])) else: if y_flag > 1: yes = [_ for _ in set(yes) if yes.count(_) > 1] for i in range(len(yes)): if yes[i] not in no: print(yes[i]) exit()