結果
問題 | No.1109 調の判定 |
ユーザー |
|
提出日時 | 2020-07-10 21:36:30 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 46 ms / 2,000 ms |
コード長 | 400 bytes |
コンパイル時間 | 206 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 52,224 KB |
最終ジャッジ日時 | 2024-10-11 08:13:37 |
合計ジャッジ時間 | 3,630 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
ソースコード
#!/usr/bin/env python3 import sys input=sys.stdin.readline n=int(input()) arr=list(map(int,input().split())) scale=[0,2,4,5,7,9,11] cand=[] for i in range(12): s=set() for j in range(7): s.add((scale[j]+i)%12) for val in arr: if val not in s: break else: cand.append(i) if len(cand)==1: print(cand[0]) else: print(-1)