結果

問題 No.185 和風
ユーザー kutsutamakutsutama
提出日時 2018-12-17 17:45:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 233 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 11,736 KB
実行使用メモリ 10,016 KB
最終ジャッジ日時 2023-10-25 23:29:13
合計ジャッジ時間 886 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

n = int(input())

an = 0
x, y = [int(x) for x in input().split()]
an = max(y - x, -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