結果
| 問題 |
No.1109 調の判定
|
| コンテスト | |
| ユーザー |
👑 SPD_9X2
|
| 提出日時 | 2020-07-10 21:31:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 358 bytes |
| コンパイル時間 | 278 ms |
| コンパイル使用メモリ | 82,152 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2024-10-11 07:57:43 |
| 合計ジャッジ時間 | 3,591 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 |
ソースコード
N = int(input())
T = list(map(int,input().split()))
ans = []
mod = 12
for D in range(12):
flag = True
for t in T:
if t not in [D % mod,(D+2)%mod,(D+4)%mod,(D+5)%mod,(D+7)%mod,(D+9)%mod,(D+11)%mod]:
flag = False
break
if flag:
ans.append(D)
if len(ans) == 1:
print (ans[0])
else:
print (-1)
SPD_9X2