結果

問題 No.185 和風
ユーザー 👑 もぐら 3.0もぐら 3.0
提出日時 2023-11-14 18:56:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 55 ms / 1,000 ms
コード長 243 bytes
コンパイル時間 375 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 63,744 KB
最終ジャッジ日時 2023-11-14 18:56:17
合計ジャッジ時間 1,474 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,332 KB
testcase_01 AC 52 ms
63,744 KB
testcase_02 AC 52 ms
63,744 KB
testcase_03 AC 52 ms
63,744 KB
testcase_04 AC 55 ms
63,744 KB
testcase_05 AC 37 ms
53,332 KB
testcase_06 AC 52 ms
63,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if XY[0][0]>=XY[0][1]:
    print(-1)
    exit()

now = XY[0][1]-XY[0][0]

for i in range(1,N):
    if XY[i][1]-XY[i][0]!=now:
        print(-1)
        exit()

print(now)
0