結果
| 問題 |
No.1120 Strange Teacher
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-25 11:30:23 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 215 bytes |
| コンパイル時間 | 348 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 54,228 KB |
| 最終ジャッジ日時 | 2024-06-27 01:04:15 |
| 合計ジャッジ時間 | 20,795 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 WA * 14 |
ソースコード
import numpy as np
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ab = []
for a,b in zip(A,B):
ab.append(abs(a-b))
x = np.lcm.reduce(ab)
print(-1 if x not in ab else x)