結果

問題 No.185 和風
ユーザー pluto77pluto77
提出日時 2016-02-07 13:09:46
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 389 bytes
コンパイル時間 488 ms
コンパイル使用メモリ 7,100 KB
実行使用メモリ 6,608 KB
最終ジャッジ日時 2023-10-21 20:03:58
合計ジャッジ時間 653 ms
ジャッジサーバーID
(参考情報)
judge10 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#coding: utf-8
##yuki_185

import sys

s=[]
n=int(raw_input())
for i in xrange(n):
 s.append(raw_input())

l=[]
for i in range(0,len(s)):
 ltt=map(int,s[i].split())
 lt=ltt[:2]
 l.append(lt)
print l

res=l[0][1]-l[0][0]
if res<0:
 print -1
 sys.exit()

for i in xrange(1,len(l)):
 if len(l[i])==1:
  break
 if l[i][1]-l[i][0]<0 or l[i][1]-l[i][0] != res:
  print -1
  sys.exit()
print res
0