結果

問題 No.185 和風
ユーザー shamioshamio
提出日時 2020-06-01 18:54:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 469 ms / 1,000 ms
コード長 223 bytes
コンパイル時間 127 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 44,696 KB
最終ジャッジ日時 2024-05-01 21:54:35
合計ジャッジ時間 4,279 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 450 ms
44,568 KB
testcase_01 AC 454 ms
44,696 KB
testcase_02 AC 457 ms
44,184 KB
testcase_03 AC 464 ms
44,184 KB
testcase_04 AC 459 ms
44,180 KB
testcase_05 AC 466 ms
44,180 KB
testcase_06 AC 469 ms
44,308 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

n = int(input())
xy = np.array([list(map(int, input().split())) for _ in range(n)], np.int64)

z = xy[:, 1] - xy[:, 0]

num = z.min()

if (z == num).all() and num > 0:
    print(num)
else:
    print(-1)
0