結果
| 問題 |
No.1109 調の判定
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-18 22:38:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 2,000 ms |
| コード長 | 384 bytes |
| コンパイル時間 | 183 ms |
| コンパイル使用メモリ | 81,664 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2024-10-08 22:55:40 |
| 合計ジャッジ時間 | 3,261 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 |
ソースコード
n = int(input())
T = list(map(int,input().split()))
ans = -1
def check(x):
for t in T:
ok = 0
for j in ((0,2,4,5,7,9,11)):
if t == (x+j)%12:
ok = 1
if ok == 0:
return False
return True
for i in range(12):
if check(i):
if ans != -1:
print(-1)
exit()
ans = i
print(ans)