結果
| 問題 | No.1120 Strange Teacher |
| コンテスト | |
| ユーザー |
asumo0729
|
| 提出日時 | 2020-07-22 21:44:26 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 329 bytes |
| 記録 | |
| コンパイル時間 | 233 ms |
| コンパイル使用メモリ | 14,848 KB |
| 実行使用メモリ | 25,308 KB |
| 最終ジャッジ日時 | 2026-10-13 15:43:16 |
| 合計ジャッジ時間 | 4,346 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 21 WA * 4 |
ソースコード
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ans=0
for x in range(n):
c=b[x]-a[x]
ans+=c
if n==2:
if a[0]-b[0]==-1*(a[1]-b[0]):
print(abs(a[0]-b[0]))
else:
print(-1)
else:
if ans%(2-n)==0:
print(ans//(2-n))
else:
print(-1)
asumo0729