結果

問題 No.24 数当てゲーム
ユーザー machoniumpmachoniump
提出日時 2023-09-18 22:20:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 432 bytes
コンパイル時間 593 ms
コンパイル使用メモリ 10,908 KB
実行使用メモリ 8,300 KB
最終ジャッジ日時 2023-09-18 22:20:06
合計ジャッジ時間 1,525 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,852 KB
testcase_01 AC 15 ms
7,808 KB
testcase_02 AC 16 ms
8,124 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 16 ms
8,112 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

yes=[0]*10
no=[0]*10
Y=0
N=0
n=int(input())

for i in range(n):
    a=list(map(str,input().split()))
    if a[-1]=="NO":
        N+=1
        for j in a[:-1]:
            no[int(j)]+=1
    else:
        Y+=1
        for j in a[:-1]:
            yes[int(j)]+=1

if Y==0:
    print(no.index(0))
elif N==0:
    print(yes.index(2))
else:
    for i in range(10):
        if yes[i]==2 and no[i]==0:
            print(i)
            exit()
0