結果

問題 No.185 和風
ユーザー togatogatogatoga
提出日時 2015-08-16 11:50:14
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 162 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 6,652 KB
実行使用メモリ 6,196 KB
最終ジャッジ日時 2023-09-25 12:18:06
合計ジャッジ時間 711 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

n = input()
s = set()
for i in range(n):
    a,b = map(int, raw_input().split())
    s.add(b - a)
if (len(s) == 1):
    print max(s.pop(), -1)
else:
    print -1
0