結果

問題 No.185 和風
ユーザー n_knuun_knuu
提出日時 2015-05-07 13:40:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 1,000 ms
コード長 236 bytes
コンパイル時間 531 ms
コンパイル使用メモリ 10,744 KB
実行使用メモリ 8,436 KB
最終ジャッジ日時 2023-09-19 07:32:52
合計ジャッジ時間 1,326 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,936 KB
testcase_01 AC 19 ms
8,272 KB
testcase_02 AC 19 ms
8,380 KB
testcase_03 AC 18 ms
8,312 KB
testcase_04 AC 19 ms
8,436 KB
testcase_05 AC 16 ms
8,240 KB
testcase_06 AC 19 ms
8,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
P = [list(map(int, input().split())) for _ in range(N)]
x0, y0 = P[0]
ans = y0 - x0
for x, y in P:
    if y - x <= 0:
        print(-1)
        exit(0)
    elif ans != y - x:
        print(-1)
        exit(0)
print(ans)
0