結果

問題 No.1109 調の判定
ユーザー 双六双六
提出日時 2020-09-07 01:31:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 576 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 87,224 KB
実行使用メモリ 71,764 KB
最終ジャッジ日時 2023-08-19 14:36:57
合計ジャッジ時間 7,415 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
71,380 KB
testcase_01 AC 86 ms
71,196 KB
testcase_02 AC 89 ms
71,332 KB
testcase_03 WA -
testcase_04 AC 88 ms
71,376 KB
testcase_05 AC 89 ms
71,140 KB
testcase_06 AC 87 ms
71,376 KB
testcase_07 AC 88 ms
71,200 KB
testcase_08 AC 87 ms
71,280 KB
testcase_09 AC 87 ms
71,276 KB
testcase_10 WA -
testcase_11 AC 87 ms
71,332 KB
testcase_12 AC 88 ms
71,376 KB
testcase_13 AC 88 ms
70,932 KB
testcase_14 AC 87 ms
71,328 KB
testcase_15 AC 88 ms
71,280 KB
testcase_16 AC 88 ms
71,136 KB
testcase_17 AC 87 ms
71,316 KB
testcase_18 AC 88 ms
71,240 KB
testcase_19 AC 86 ms
71,356 KB
testcase_20 AC 88 ms
71,188 KB
testcase_21 AC 89 ms
71,140 KB
testcase_22 AC 87 ms
71,084 KB
testcase_23 AC 89 ms
71,192 KB
testcase_24 AC 88 ms
71,200 KB
testcase_25 AC 88 ms
71,320 KB
testcase_26 AC 88 ms
71,076 KB
testcase_27 AC 88 ms
71,280 KB
testcase_28 AC 89 ms
71,188 KB
testcase_29 AC 87 ms
71,136 KB
testcase_30 AC 89 ms
71,332 KB
testcase_31 AC 88 ms
71,240 KB
testcase_32 AC 88 ms
71,140 KB
testcase_33 AC 89 ms
71,200 KB
testcase_34 AC 88 ms
71,384 KB
testcase_35 AC 88 ms
71,376 KB
testcase_36 AC 86 ms
71,364 KB
testcase_37 AC 88 ms
71,324 KB
testcase_38 AC 88 ms
71,324 KB
testcase_39 AC 88 ms
71,332 KB
testcase_40 AC 88 ms
71,324 KB
testcase_41 AC 88 ms
71,332 KB
testcase_42 AC 87 ms
71,084 KB
testcase_43 AC 93 ms
71,348 KB
testcase_44 AC 87 ms
71,328 KB
testcase_45 AC 87 ms
71,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	T = getlist()
	L = [0, 2, 4, 5, 7, 9, 11]
	D = -1
	for d in range(12):
		jud = 1
		for i in T:
			if not ((d + i) % 12 in L):
				jud = 0
				break

		if jud == 1:
			# print(d)
			if D == -1:
				D = 12 - d
			else:
				print(-1)
				return

	if D == -1:
		print(-1)
	else:
		print(D)

if __name__ == '__main__':
	main()
0