結果

問題 No.185 和風
ユーザー yuppe19 😺yuppe19 😺
提出日時 2015-04-20 14:27:14
言語 Python2
(2.7.18)
結果
AC  
実行時間 14 ms / 1,000 ms
コード長 217 bytes
コンパイル時間 559 ms
コンパイル使用メモリ 6,684 KB
実行使用メモリ 6,180 KB
最終ジャッジ日時 2023-09-18 00:51:45
合計ジャッジ時間 1,358 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#!/usr/bin/python
n = int(raw_input())
xys = [map(int, raw_input().split()) for _ in xrange(n)]
ans = list(set(y-x for x, y in xys))
if len(ans) != 1:
    print -1
    exit(0)
res = ans[0]
print res if res > 0 else -1
0