結果

問題 No.185 和風
ユーザー wata_pythonwata_python
提出日時 2019-08-17 15:12:54
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 32 ms / 1,000 ms
コード長 264 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 11,756 KB
実行使用メモリ 10,096 KB
最終ジャッジ日時 2023-10-25 00:40:42
合計ジャッジ時間 909 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,088 KB
testcase_01 AC 32 ms
10,096 KB
testcase_02 AC 28 ms
10,092 KB
testcase_03 AC 27 ms
10,092 KB
testcase_04 AC 29 ms
10,092 KB
testcase_05 AC 27 ms
10,088 KB
testcase_06 AC 31 ms
10,092 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
c = 0
for i in range(n):
    a, b = map(int, input().split())
    if i == 0:
        C=b-a
        if C<=0:
            print(-1)
            break
    else:
        c=b-a
        if C!=c:
            print(-1)
            break
else:
    print(C)
0