結果

問題 No.185 和風
ユーザー ゆるくゆるく
提出日時 2015-04-23 23:45:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 282 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 10,516 KB
実行使用メモリ 7,916 KB
最終ジャッジ日時 2023-09-18 08:45:47
合計ジャッジ時間 862 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,720 KB
testcase_01 AC 19 ms
7,916 KB
testcase_02 AC 16 ms
7,912 KB
testcase_03 AC 16 ms
7,812 KB
testcase_04 AC 17 ms
7,736 KB
testcase_05 WA -
testcase_06 AC 19 ms
7,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x1, y1 = map(int, input().split())
z = max(y1 - x1, -1)
n -= 1
if n <= 0 or z == -1:
    print(z)
else:
    for _ in range(n):
        x, y = map(int, input().split())
        tz = max(y - x, -1)
        if tz != z:
            z = -1
            break
    print(z)
0