結果

問題 No.185 和風
ユーザー 👑 yumechiyumechi
提出日時 2015-04-19 23:42:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 1,000 ms
コード長 231 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 10,568 KB
実行使用メモリ 8,200 KB
最終ジャッジ日時 2023-09-18 01:46:15
合計ジャッジ時間 796 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,848 KB
testcase_01 AC 18 ms
8,200 KB
testcase_02 AC 16 ms
8,084 KB
testcase_03 AC 16 ms
8,028 KB
testcase_04 AC 17 ms
8,056 KB
testcase_05 AC 16 ms
8,024 KB
testcase_06 AC 19 ms
7,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
res = 0
a, b = map(int, input().split())
res = b - a
if res < 1:
    print(-1)
    exit(0)
for _ in range(N-1):
    a, b = map(int, input().split())
    if res != b - a:
        print(-1)
        exit(0)
print(res)
0