結果

問題 No.24 数当てゲーム
ユーザー MamonboMamonbo
提出日時 2015-07-15 17:45:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 872 bytes
コンパイル時間 302 ms
コンパイル使用メモリ 11,004 KB
実行使用メモリ 7,924 KB
最終ジャッジ日時 2023-09-22 16:34:20
合計ジャッジ時間 944 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,836 KB
testcase_01 AC 16 ms
7,736 KB
testcase_02 AC 15 ms
7,796 KB
testcase_03 AC 16 ms
7,792 KB
testcase_04 AC 15 ms
7,836 KB
testcase_05 AC 16 ms
7,772 KB
testcase_06 AC 15 ms
7,832 KB
testcase_07 AC 16 ms
7,812 KB
testcase_08 AC 16 ms
7,924 KB
testcase_09 AC 16 ms
7,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding=UTF-8

N=int(input())

R=list(range(0,N,1))

taro=list(range(0,N,1))
for idx in range(0,N,1):
    mojir=input()
    hyo=mojir.split(" ")
    A=int(hyo[0])
    B=int(hyo[1])
    C=int(hyo[2])
    D=int(hyo[3])
    taro[idx]=(A,B,C,D)
    R[idx]=hyo[4]
    

guess=list(range(0,10,1))
for idx in range(0,10,1):
    guess[idx]=True

hicacu=list(range(0,10,1))
for idx in range(0,N,1):
    if R[idx]=="NO":
        for idy in range(0,10,1):
            if idy in taro[idx]:
                hicacu[idy]=False
            else:
                hicacu[idy]=True
    else:
        for idy in range(0,10,1):
            if idy in taro[idx]:
                hicacu[idy]=True
            else:
                hicacu[idy]=False
    for idy in range(0,10,1):
        guess[idy]=guess[idy] and hicacu[idy]


for idy in range(0,10,1):
    if guess[idy]==True:
        print(idy)
0