結果

問題 No.185 和風
ユーザー かいかいかいかい
提出日時 2022-07-24 19:54:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 255 bytes
コンパイル時間 134 ms
コンパイル使用メモリ 10,608 KB
実行使用メモリ 8,248 KB
最終ジャッジ日時 2023-09-20 19:59:28
合計ジャッジ時間 790 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,744 KB
testcase_01 AC 18 ms
8,152 KB
testcase_02 AC 18 ms
8,248 KB
testcase_03 AC 18 ms
8,184 KB
testcase_04 AC 18 ms
8,184 KB
testcase_05 WA -
testcase_06 AC 18 ms
8,196 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