結果

問題 No.1109 調の判定
ユーザー U SU S
提出日時 2020-07-10 21:28:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 706 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 82,452 KB
実行使用メモリ 53,976 KB
最終ジャッジ日時 2024-04-19 15:42:00
合計ジャッジ時間 2,710 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,944 KB
testcase_01 AC 33 ms
52,412 KB
testcase_02 AC 33 ms
52,520 KB
testcase_03 AC 31 ms
52,092 KB
testcase_04 AC 30 ms
53,680 KB
testcase_05 AC 30 ms
53,424 KB
testcase_06 AC 30 ms
52,068 KB
testcase_07 AC 31 ms
52,268 KB
testcase_08 AC 32 ms
52,264 KB
testcase_09 AC 32 ms
53,712 KB
testcase_10 AC 32 ms
52,480 KB
testcase_11 AC 30 ms
52,288 KB
testcase_12 AC 32 ms
52,528 KB
testcase_13 AC 32 ms
52,140 KB
testcase_14 AC 31 ms
53,100 KB
testcase_15 AC 32 ms
53,312 KB
testcase_16 AC 31 ms
52,736 KB
testcase_17 AC 30 ms
52,148 KB
testcase_18 AC 30 ms
53,316 KB
testcase_19 AC 31 ms
52,428 KB
testcase_20 AC 31 ms
52,376 KB
testcase_21 AC 32 ms
52,752 KB
testcase_22 AC 31 ms
53,976 KB
testcase_23 AC 32 ms
52,112 KB
testcase_24 AC 31 ms
52,816 KB
testcase_25 AC 31 ms
52,488 KB
testcase_26 AC 31 ms
53,352 KB
testcase_27 AC 31 ms
52,064 KB
testcase_28 AC 32 ms
52,504 KB
testcase_29 AC 31 ms
52,552 KB
testcase_30 AC 31 ms
53,148 KB
testcase_31 AC 31 ms
52,824 KB
testcase_32 AC 32 ms
53,372 KB
testcase_33 AC 31 ms
52,552 KB
testcase_34 AC 31 ms
52,552 KB
testcase_35 AC 32 ms
52,336 KB
testcase_36 AC 33 ms
52,796 KB
testcase_37 AC 33 ms
53,000 KB
testcase_38 AC 32 ms
52,872 KB
testcase_39 AC 32 ms
52,004 KB
testcase_40 AC 32 ms
52,296 KB
testcase_41 AC 32 ms
53,808 KB
testcase_42 AC 33 ms
52,400 KB
testcase_43 AC 32 ms
52,396 KB
testcase_44 AC 32 ms
53,224 KB
testcase_45 AC 32 ms
53,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# a,b,c,d = map(int,input().split())
# if a < b and c > d:
#     print("YES")
# else:print("NO")

# n,h = map(int,input().split())
# a = list(map(int,input().split()))
# for i in range(n):
#     a[i] += h
# print(*a)

n = int(input())
t = list(map(int,input().split()))
comb = []
for i in range(12):
    u = []
    u.append(i)
    u.append((i+2)%12)
    u.append((i+4)%12)
    u.append((i+5)%12)
    u.append((i+7)%12)
    u.append((i+9)%12)
    u.append((i+11)%12)
    comb.append(u)
ans = []
for i in range(12):
    tar = comb[i]
    flag = True
    for j in t:
        if j not in tar:
            flag = False
    if flag:
        ans.append(i)
if len(ans) == 1:
    print(ans[0])
else:
    print(-1)

0