結果

問題 No.185 和風
ユーザー tora3kuma3tora3kuma3
提出日時 2015-04-28 20:52:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 18 ms / 1,000 ms
コード長 245 bytes
コンパイル時間 604 ms
コンパイル使用メモリ 10,624 KB
実行使用メモリ 8,628 KB
最終ジャッジ日時 2023-09-18 14:10:17
合計ジャッジ時間 1,362 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,304 KB
testcase_01 AC 18 ms
8,512 KB
testcase_02 AC 17 ms
8,540 KB
testcase_03 AC 18 ms
8,628 KB
testcase_04 AC 17 ms
8,508 KB
testcase_05 AC 15 ms
7,872 KB
testcase_06 AC 17 ms
8,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin
readline = stdin.readline

n = int(readline())
xy = [map(int, readline().split()) for _ in range(n)]
diff = [y - x for x, y in xy]
if 0 < diff[0] and all(di == diff[0] for di in diff):
    print(diff[0])
else:
    print(-1)
0