結果

問題 No.185 和風
ユーザー かいかいかいかい
提出日時 2022-07-24 19:55:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 20 ms / 1,000 ms
コード長 256 bytes
コンパイル時間 114 ms
コンパイル使用メモリ 10,676 KB
実行使用メモリ 8,360 KB
最終ジャッジ日時 2023-09-20 20:00:41
合計ジャッジ時間 720 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,744 KB
testcase_01 AC 18 ms
8,360 KB
testcase_02 AC 20 ms
8,196 KB
testcase_03 AC 18 ms
8,240 KB
testcase_04 AC 18 ms
8,360 KB
testcase_05 AC 15 ms
7,752 KB
testcase_06 AC 17 ms
8,260 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
X = [list(map(int, input().split(' '))) for _ in range(N)]

A = X[0][1] - X[0][0]

for i in (X):
    if i[1] <= i[0]:
        print(-1)
        break
    elif A != i[1] - i[0]:
        print(-1)
        break
else:
     print(i[1] - i[0])
0