結果

問題 No.185 和風
ユーザー Liny52551272
提出日時 2019-11-18 16:54:52
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 258 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-01 21:15:23
合計ジャッジ時間 905 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 WA * 1 RE * 4
権限があれば一括ダウンロードができます

ソースコード

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