結果
問題 | No.1109 調の判定 |
ユーザー |
👑 ![]() |
提出日時 | 2020-07-10 21:39:44 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 44 ms / 2,000 ms |
コード長 | 337 bytes |
コンパイル時間 | 231 ms |
コンパイル使用メモリ | 82,084 KB |
実行使用メモリ | 54,016 KB |
最終ジャッジ日時 | 2024-10-11 08:26:52 |
合計ジャッジ時間 | 3,628 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
ソースコード
from copy import deepcopy N=int(input()) T=list(map(int,input().split())) G=[] for i in range(12): G.append([i,(i+2)%12,(i+4)%12,(i+5)%12,(i+7)%12,(i+9)%12,(i+11)%12]) for t in T: V=[] for H in G: if t in H: V.append(H) G=deepcopy(V) if len(G)!=1: print(-1) else: print(G[0][0])