結果

問題 No.185 和風
ユーザー Tna
提出日時 2022-08-10 16:58:02
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 38 ms / 1,000 ms
コード長 206 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-09-21 03:42:24
合計ジャッジ時間 871 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
D = [[int(x) for x in input().split()] for _ in range(N)]
# print(D)
results = [d[1]-d[0] for d in D]
if len(set(results)) == 1 and results[0] > 0:
    print(results[0])
else:
    print(-1)
0