結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 12 ms
8,068 KB
testcase_02 AC 13 ms
8,184 KB
testcase_03 AC 13 ms
8,064 KB
testcase_04 WA -
testcase_05 AC 13 ms
8,072 KB
testcase_06 WA -
権限があれば一括ダウンロードができます

ソースコード

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