結果

問題 No.185 和風
ユーザー pluto77pluto77
提出日時 2016-02-25 16:17:01
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 295 bytes
コンパイル時間 705 ms
コンパイル使用メモリ 7,176 KB
実行使用メモリ 6,492 KB
最終ジャッジ日時 2023-10-23 20:01:27
合計ジャッジ時間 1,362 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#coding: utf-8
##yuki_185
import sys

n=int(raw_input())

for i in xrange(n):
 s=map(int,raw_input().split())
 x=s[0]
 y=s[1]
 if i==0:
  if y-x>=0:
   temp=y-x
  else:
   print -1
   sys.exit()
 else:
  if y-x>=0 and temp==y-x:
   continue
  else:
   print -1
   sys.exit()

res=temp
print res
0