結果

問題 No.1109 調の判定
ユーザー 👑 KazunKazun
提出日時 2020-07-10 21:39:44
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 337 bytes
コンパイル時間 1,004 ms
コンパイル使用メモリ 86,860 KB
実行使用メモリ 71,720 KB
最終ジャッジ日時 2023-08-01 17:07:12
合計ジャッジ時間 7,112 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
71,408 KB
testcase_01 AC 83 ms
71,400 KB
testcase_02 AC 84 ms
71,456 KB
testcase_03 AC 86 ms
71,396 KB
testcase_04 AC 84 ms
71,620 KB
testcase_05 AC 83 ms
71,568 KB
testcase_06 AC 85 ms
71,632 KB
testcase_07 AC 86 ms
71,300 KB
testcase_08 AC 85 ms
71,504 KB
testcase_09 AC 87 ms
71,624 KB
testcase_10 AC 85 ms
71,440 KB
testcase_11 AC 85 ms
71,500 KB
testcase_12 AC 85 ms
71,300 KB
testcase_13 AC 85 ms
71,620 KB
testcase_14 AC 86 ms
71,572 KB
testcase_15 AC 88 ms
71,456 KB
testcase_16 AC 87 ms
71,576 KB
testcase_17 AC 85 ms
71,504 KB
testcase_18 AC 87 ms
71,572 KB
testcase_19 AC 85 ms
71,568 KB
testcase_20 AC 87 ms
71,528 KB
testcase_21 AC 86 ms
71,524 KB
testcase_22 AC 85 ms
71,556 KB
testcase_23 AC 85 ms
71,532 KB
testcase_24 AC 84 ms
71,456 KB
testcase_25 AC 83 ms
71,552 KB
testcase_26 AC 83 ms
71,572 KB
testcase_27 AC 86 ms
71,708 KB
testcase_28 AC 84 ms
71,276 KB
testcase_29 AC 84 ms
71,496 KB
testcase_30 AC 84 ms
71,400 KB
testcase_31 AC 85 ms
71,692 KB
testcase_32 AC 86 ms
71,392 KB
testcase_33 AC 83 ms
71,372 KB
testcase_34 AC 84 ms
71,708 KB
testcase_35 AC 84 ms
71,296 KB
testcase_36 AC 84 ms
71,272 KB
testcase_37 AC 86 ms
71,720 KB
testcase_38 AC 84 ms
71,432 KB
testcase_39 AC 85 ms
71,484 KB
testcase_40 AC 87 ms
71,504 KB
testcase_41 AC 87 ms
71,392 KB
testcase_42 AC 84 ms
71,556 KB
testcase_43 AC 87 ms
71,572 KB
testcase_44 AC 85 ms
71,456 KB
testcase_45 AC 86 ms
71,272 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