結果

問題 No.185 和風
ユーザー TnaTna
提出日時 2022-08-10 16:58:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 31 ms / 1,000 ms
コード長 206 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 11,676 KB
実行使用メモリ 10,256 KB
最終ジャッジ日時 2023-10-21 02:41:26
合計ジャッジ時間 807 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
10,068 KB
testcase_01 AC 31 ms
10,224 KB
testcase_02 AC 31 ms
10,224 KB
testcase_03 AC 31 ms
10,256 KB
testcase_04 AC 28 ms
10,224 KB
testcase_05 AC 25 ms
10,032 KB
testcase_06 AC 29 ms
10,216 KB
権限があれば一括ダウンロードができます

ソースコード

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