結果

問題 No.185 和風
ユーザー kutsutamakutsutama
提出日時 2018-12-17 17:57:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 33 ms / 1,000 ms
コード長 239 bytes
コンパイル時間 228 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 10,048 KB
最終ジャッジ日時 2023-10-25 23:29:14
合計ジャッジ時間 930 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,040 KB
testcase_01 AC 33 ms
10,048 KB
testcase_02 AC 33 ms
10,048 KB
testcase_03 AC 33 ms
10,048 KB
testcase_04 AC 33 ms
10,048 KB
testcase_05 AC 30 ms
10,040 KB
testcase_06 AC 33 ms
10,044 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

x, y = [int(x) for x in input().split()]
an = y - x
if an <= 0:
  an = -1
for i in range(n - 1):
  xi, yi = [int(x) for x in input().split()]
  if an < 0:
    continue
  su = yi - xi
  if su != an:
    an = -1

print(an)
0