結果

問題 No.185 和風
ユーザー Co-3Co-3
提出日時 2020-09-20 01:42:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 22 ms / 1,000 ms
コード長 221 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 8,136 KB
最終ジャッジ日時 2023-09-06 05:30:38
合計ジャッジ時間 1,133 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
7,868 KB
testcase_01 AC 20 ms
8,136 KB
testcase_02 AC 16 ms
8,092 KB
testcase_03 AC 17 ms
8,072 KB
testcase_04 AC 17 ms
8,092 KB
testcase_05 AC 16 ms
8,100 KB
testcase_06 AC 22 ms
7,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a = int(input())
b,c = map(int,input().split())
e = c-b
if e <= 0:
    print(-1)
    quit()
for i in range(a-1):
    b,c = map(int,input().split())
    d = c-b
    if d != e:
        print(-1)
        quit()
print(e)
    
0