結果

問題 No.185 和風
ユーザー miya145592miya145592
提出日時 2023-05-03 18:34:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 1,000 ms
コード長 202 bytes
コンパイル時間 439 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 76,036 KB
最終ジャッジ日時 2023-08-14 02:10:55
合計ジャッジ時間 1,591 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
71,328 KB
testcase_01 AC 69 ms
76,008 KB
testcase_02 AC 76 ms
76,024 KB
testcase_03 AC 72 ms
76,036 KB
testcase_04 AC 72 ms
75,952 KB
testcase_05 AC 60 ms
71,228 KB
testcase_06 AC 71 ms
75,956 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