結果

問題 No.185 和風
ユーザー Liny52551272Liny52551272
提出日時 2019-11-18 16:54:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 258 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-04-09 20:50:55
合計ジャッジ時間 793 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

N = int(input().strip())

a = -1

for i in range(N):
  X, Y = (int(j) for j in input().strip().split(' '))
  
  if a < 0:
    a = Y - X
    if a < 0:
      print('-1')
      exit(1)
  else:
    if a != Y - X:
      print('-1')
      exit(1)
else:
  print(a)
0