結果

問題 No.185 和風
ユーザー togatogatogatoga
提出日時 2015-08-16 11:53:01
言語 Python2
(2.7.18)
結果
AC  
実行時間 15 ms / 1,000 ms
コード長 176 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 6,660 KB
実行使用メモリ 6,200 KB
最終ジャッジ日時 2023-09-25 12:18:20
合計ジャッジ時間 681 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

n = input()
s = set()
for i in range(n):
    a,b = map(int, raw_input().split())
    s.add(b - a)
l = list(s)
if (len(s) == 1 and l[0] >= 1):
    print l[0]
else:
    print -1
0