結果

問題 No.185 和風
ユーザー shamioshamio
提出日時 2020-07-18 07:10:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 116 ms / 1,000 ms
コード長 223 bytes
コンパイル時間 964 ms
コンパイル使用メモリ 10,548 KB
実行使用メモリ 29,960 KB
最終ジャッジ日時 2023-08-20 16:53:20
合計ジャッジ時間 1,680 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
29,636 KB
testcase_01 AC 113 ms
29,812 KB
testcase_02 AC 116 ms
29,816 KB
testcase_03 AC 110 ms
29,960 KB
testcase_04 AC 111 ms
29,884 KB
testcase_05 AC 109 ms
29,668 KB
testcase_06 AC 109 ms
29,796 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