結果

問題 No.185 和風
ユーザー shamioshamio
提出日時 2020-06-01 18:54:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 135 ms / 1,000 ms
コード長 223 bytes
コンパイル時間 415 ms
コンパイル使用メモリ 10,684 KB
実行使用メモリ 29,968 KB
最終ジャッジ日時 2023-08-14 09:19:49
合計ジャッジ時間 3,515 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
29,816 KB
testcase_01 AC 135 ms
29,968 KB
testcase_02 AC 134 ms
29,968 KB
testcase_03 AC 131 ms
29,932 KB
testcase_04 AC 134 ms
29,952 KB
testcase_05 AC 132 ms
29,804 KB
testcase_06 AC 134 ms
29,736 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