結果

問題 No.185 和風
ユーザー yomo3yomo3
提出日時 2020-01-25 00:14:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 18 ms / 1,000 ms
コード長 214 bytes
コンパイル時間 116 ms
コンパイル使用メモリ 10,620 KB
実行使用メモリ 8,288 KB
最終ジャッジ日時 2023-10-12 04:26:48
合計ジャッジ時間 831 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,804 KB
testcase_01 AC 18 ms
8,288 KB
testcase_02 AC 18 ms
8,248 KB
testcase_03 AC 18 ms
8,256 KB
testcase_04 AC 18 ms
8,284 KB
testcase_05 AC 15 ms
7,816 KB
testcase_06 AC 18 ms
8,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
xy = [list(map(int, input().split())) for _ in range(n)]

ans = [xy[i][1]-xy[i][0] for i in range(n)]
if ans[0] > 0 and all(ans[i]==ans[0] for i in range(n)):
    print(ans[0])
else:
    print(-1)
0