結果

問題 No.24 数当てゲーム
ユーザー rocoderrocoder
提出日時 2017-05-09 05:17:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 837 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 10,972 KB
実行使用メモリ 8,016 KB
最終ジャッジ日時 2023-10-12 20:03:06
合計ジャッジ時間 970 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

N=int(input())
i=0
A=[]
for i in range(N):
    A.append(input().split())
    i+=1
y=0
i=0
K=["0","1","2","3","4","5","6","7","8","9"]
while y==0 and i<N:
    if A[i][4]=="YES":
        K=A[i][:-1]
   #     print (K)
        y=1
        i-=1
    i=i+1
e=0
while len(K)>1:
    if i==N:
        i=0
    else:
        i+=1
    j=0
    while len(K)>1 and j<len(K):
        m=0
        ex=0
        while ex==0 and m<4:
  #          print(K[j])
            if K[j]==A[i][m]:
         #print(A[i][m])
                if A[i][4]=="NO":
                    K.pop(j)
                    j-=1
          #          print(K)
                ex=1
            else:
                m+=1
        if ex==0:
            if A[i][4]=="YES":
                K.pop(j)
                j-=1
      #          print(j)      
        j+=1
  #  print(K)
print(K[0])
0