結果

問題 No.185 和風
ユーザー a_tena_ten
提出日時 2016-03-14 22:42:06
言語 Python2
(2.7.18)
結果
AC  
実行時間 16 ms / 1,000 ms
コード長 205 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,784 KB
最終ジャッジ日時 2024-04-08 11:21:00
合計ジャッジ時間 734 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#coding:utf-8

n=input()
a=[raw_input().split() for i in range(n)]

s=set()
for i in a:
	s.add(int(i[1])-int(i[0]))

s_list=list(s)
	
if len(s_list) == 1 and 0 < s_list[0]:
	print s_list[0]
else:
	print -1
0