結果

問題 No.185 和風
ユーザー souta-1326souta-1326
提出日時 2020-11-02 23:44:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 18 ms / 1,000 ms
コード長 212 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 10,584 KB
実行使用メモリ 8,164 KB
最終ジャッジ日時 2023-09-29 14:10:13
合計ジャッジ時間 763 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,880 KB
testcase_01 AC 18 ms
8,052 KB
testcase_02 AC 14 ms
8,080 KB
testcase_03 AC 14 ms
8,048 KB
testcase_04 AC 14 ms
8,060 KB
testcase_05 AC 14 ms
8,164 KB
testcase_06 AC 17 ms
7,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a,b = map(int,input().split())
if a >= b:
    print(-1)
    exit()
ans = b-a
for i in range(n-1):
    a,b = map(int,input().split())
    if b-a != ans:
        print(-1)
        exit()
print(ans)
0