結果

問題 No.1109 調の判定
ユーザー now4estnow4est
提出日時 2020-07-11 00:07:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 36 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 345 ms
コンパイル使用メモリ 82,440 KB
実行使用メモリ 53,948 KB
最終ジャッジ日時 2024-04-20 01:33:06
合計ジャッジ時間 2,910 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
52,620 KB
testcase_01 AC 32 ms
52,544 KB
testcase_02 AC 31 ms
52,748 KB
testcase_03 AC 31 ms
52,276 KB
testcase_04 AC 32 ms
53,192 KB
testcase_05 AC 32 ms
52,808 KB
testcase_06 AC 31 ms
52,440 KB
testcase_07 AC 31 ms
53,136 KB
testcase_08 AC 33 ms
53,004 KB
testcase_09 AC 35 ms
52,404 KB
testcase_10 AC 32 ms
51,944 KB
testcase_11 AC 34 ms
51,956 KB
testcase_12 AC 33 ms
53,068 KB
testcase_13 AC 33 ms
52,216 KB
testcase_14 AC 32 ms
52,576 KB
testcase_15 AC 31 ms
53,144 KB
testcase_16 AC 30 ms
53,480 KB
testcase_17 AC 31 ms
51,956 KB
testcase_18 AC 31 ms
53,216 KB
testcase_19 AC 32 ms
52,500 KB
testcase_20 AC 33 ms
52,568 KB
testcase_21 AC 31 ms
52,400 KB
testcase_22 AC 32 ms
52,512 KB
testcase_23 AC 32 ms
52,128 KB
testcase_24 AC 32 ms
52,016 KB
testcase_25 AC 31 ms
51,944 KB
testcase_26 AC 30 ms
53,100 KB
testcase_27 AC 31 ms
52,556 KB
testcase_28 AC 31 ms
53,584 KB
testcase_29 AC 30 ms
52,252 KB
testcase_30 AC 31 ms
53,744 KB
testcase_31 AC 30 ms
53,948 KB
testcase_32 AC 35 ms
52,824 KB
testcase_33 AC 32 ms
53,128 KB
testcase_34 AC 34 ms
52,340 KB
testcase_35 AC 34 ms
51,996 KB
testcase_36 AC 35 ms
52,808 KB
testcase_37 AC 32 ms
52,212 KB
testcase_38 AC 34 ms
52,436 KB
testcase_39 AC 31 ms
53,332 KB
testcase_40 AC 36 ms
53,288 KB
testcase_41 AC 32 ms
52,548 KB
testcase_42 AC 32 ms
52,516 KB
testcase_43 AC 33 ms
52,620 KB
testcase_44 AC 31 ms
52,960 KB
testcase_45 AC 30 ms
52,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().strip()

_ = input() # N
T = set(map(int, input().split()))

def C(d):
    return set(map(lambda x: x % 12, [d, d+2, d+4, d+5, d+7, d+9, d+11]))

ans = [D for D in range(12) if T <= C(D)]

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