結果

問題 No.1109 調の判定
コンテスト
ユーザー zaki_chemtech
提出日時 2020-07-13 14:53:25
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 424 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 64 ms
コンパイル使用メモリ 82,332 KB
実行使用メモリ 56,776 KB
最終ジャッジ日時 2026-09-20 18:14:24
合計ジャッジ時間 3,508 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 35 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

check = [0, 2, 4, 5, 7, 9, 11]

n=int(input())

t = list(map(int,input().split()))

flag_ans = False
for i in range(12):
    flag_ok = True
    for j in t:
        if (i+j)%12 not in check:
            flag_ok = False
            break
    if flag_ok:
        if flag_ans:
            print(-1)
            exit()
        else:
            flag_ans = True
            ans = i

if flag_ans:
    print(ans)
else:
    print(-1)
0