結果

問題 No.185 和風
ユーザー gorugo30
提出日時 2021-02-22 23:05:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 54 ms / 1,000 ms
コード長 223 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 61,440 KB
最終ジャッジ日時 2024-09-21 18:29:11
合計ジャッジ時間 926 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
x, y = map(int, input().split())
ans = y - x
if ans <= 0:
    print(-1)
    exit()
for i in range(1, N):
    x, y = map(int, input().split())
    if ans != y - x:
        print(-1)
        exit()
print(ans)
0