結果
| 問題 |
No.1109 調の判定
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-11 19:50:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 43 ms / 2,000 ms |
| コード長 | 378 bytes |
| コンパイル時間 | 299 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2024-09-15 23:35:19 |
| 合計ジャッジ時間 | 3,759 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 |
ソースコード
n = int(input())
array = list(map(int,input().split()))
count = []
for i in range(0,12):
flag = True
for j in array:
if j in [i,(i+2)%12,(i+4)%12,(i+5)%12,(i+7)%12,(i+9)%12,(i+11)%12]:
continue
else:
flag = False
break
if flag:
count.append(i)
if len(count)==1:
print(count[0])
else:
print(-1)