結果
問題 |
No.24 数当てゲーム
|
ユーザー |
|
提出日時 | 2022-07-17 17:55:58 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 5,000 ms |
コード長 | 693 bytes |
コンパイル時間 | 115 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-06-29 19:14:30 |
合計ジャッジ時間 | 1,482 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
# input N = int(input()) A_D = [] R = [] in_l = [] for i in range(N): a,b,c,d,r = input().split() A_D.append([int(a), int(b), int(c), int(d)]) R.append(r) ans_l = [True for i in range(10)] # YES → 答えの候補から、入力4つ以外のものを消す # NO → 入力4つを消す for i in range(N): if(R[i] == 'YES'): for j in range(10): if(not ans_l[j]): continue if(not(A_D[i][0] == j) and not(A_D[i][1] == j) and not(A_D[i][2] == j) and not(A_D[i][3] == j)): ans_l[j] = False else: for j in range(10): if(A_D[i][0] == j or A_D[i][1] == j or A_D[i][2] == j or A_D[i][3] == j): ans_l[j] = False for j in range(10): if(ans_l[j]): print(j) exit()