結果

問題 No.1109 調の判定
ユーザー 👑 KazunKazun
提出日時 2020-07-10 21:39:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 337 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 82,292 KB
実行使用メモリ 54,992 KB
最終ジャッジ日時 2024-04-19 16:22:29
合計ジャッジ時間 3,206 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,996 KB
testcase_01 AC 37 ms
54,300 KB
testcase_02 AC 37 ms
54,744 KB
testcase_03 AC 37 ms
54,668 KB
testcase_04 AC 37 ms
54,424 KB
testcase_05 AC 38 ms
54,172 KB
testcase_06 AC 39 ms
53,712 KB
testcase_07 AC 37 ms
53,812 KB
testcase_08 AC 38 ms
54,652 KB
testcase_09 AC 36 ms
54,660 KB
testcase_10 AC 37 ms
53,712 KB
testcase_11 AC 36 ms
54,512 KB
testcase_12 AC 37 ms
54,004 KB
testcase_13 AC 38 ms
54,436 KB
testcase_14 AC 36 ms
53,956 KB
testcase_15 AC 38 ms
54,856 KB
testcase_16 AC 38 ms
53,628 KB
testcase_17 AC 37 ms
54,276 KB
testcase_18 AC 37 ms
54,228 KB
testcase_19 AC 38 ms
54,000 KB
testcase_20 AC 37 ms
54,660 KB
testcase_21 AC 35 ms
53,196 KB
testcase_22 AC 36 ms
54,508 KB
testcase_23 AC 37 ms
53,404 KB
testcase_24 AC 37 ms
53,472 KB
testcase_25 AC 37 ms
54,224 KB
testcase_26 AC 39 ms
53,816 KB
testcase_27 AC 36 ms
53,620 KB
testcase_28 AC 36 ms
54,356 KB
testcase_29 AC 36 ms
54,480 KB
testcase_30 AC 36 ms
54,308 KB
testcase_31 AC 37 ms
54,984 KB
testcase_32 AC 36 ms
54,936 KB
testcase_33 AC 37 ms
54,252 KB
testcase_34 AC 36 ms
54,560 KB
testcase_35 AC 37 ms
54,992 KB
testcase_36 AC 38 ms
53,892 KB
testcase_37 AC 36 ms
54,748 KB
testcase_38 AC 36 ms
54,572 KB
testcase_39 AC 36 ms
54,280 KB
testcase_40 AC 38 ms
54,316 KB
testcase_41 AC 37 ms
53,744 KB
testcase_42 AC 37 ms
53,572 KB
testcase_43 AC 36 ms
54,084 KB
testcase_44 AC 36 ms
54,328 KB
testcase_45 AC 38 ms
54,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from copy import deepcopy

N=int(input())
T=list(map(int,input().split()))

G=[]
for i in range(12):
    G.append([i,(i+2)%12,(i+4)%12,(i+5)%12,(i+7)%12,(i+9)%12,(i+11)%12])

for t in T:
    V=[]
    for H in G:
        if t in H:
            V.append(H)

    G=deepcopy(V)

if len(G)!=1:
    print(-1)
else:
    print(G[0][0])
        
0