結果

問題 No.185 和風
ユーザー e-mone-mon
提出日時 2015-04-19 23:33:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 1,000 ms
コード長 255 bytes
コンパイル時間 370 ms
コンパイル使用メモリ 10,572 KB
実行使用メモリ 8,188 KB
最終ジャッジ日時 2023-09-18 01:27:15
合計ジャッジ時間 924 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,188 KB
testcase_01 AC 19 ms
7,836 KB
testcase_02 AC 17 ms
7,896 KB
testcase_03 AC 15 ms
7,880 KB
testcase_04 AC 18 ms
8,040 KB
testcase_05 AC 16 ms
8,044 KB
testcase_06 AC 18 ms
8,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
# -*- coding: utf-8 -*-

N = int(input())
X,Y = map(int,input().split())
ans = Y-X
for i in range(N-1):
    X,Y = map(int,input().split())
    if ans != Y-X:
        break
else:
    print(ans if ans > 0 else -1)
    quit()
print(-1)
0