結果

問題 No.1109 調の判定
コンテスト
ユーザー zaki_chemtech
提出日時 2020-07-13 14:53:25
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 424 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 603 ms
コンパイル使用メモリ 84,864 KB
実行使用メモリ 52,096 KB
最終ジャッジ日時 2026-05-08 00:55:08
合計ジャッジ時間 4,368 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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