結果

問題 No.185 和風
ユーザー miya145592miya145592
提出日時 2023-05-03 18:34:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 58 ms / 1,000 ms
コード長 202 bytes
コンパイル時間 419 ms
コンパイル使用メモリ 82,140 KB
実行使用メモリ 64,508 KB
最終ジャッジ日時 2024-05-01 15:15:48
合計ジャッジ時間 1,191 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
53,728 KB
testcase_01 AC 58 ms
63,912 KB
testcase_02 AC 58 ms
63,648 KB
testcase_03 AC 57 ms
63,176 KB
testcase_04 AC 57 ms
63,516 KB
testcase_05 AC 42 ms
54,496 KB
testcase_06 AC 58 ms
64,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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