結果

問題 No.185 和風
ユーザー Hagian
提出日時 2021-06-03 19:42:02
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 329 bytes
コンパイル時間 527 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2024-11-17 06:41:36
合計ジャッジ時間 1,168 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
xy = [map(int, input().split()) for i in range(N)]
x, y = [list(i) for i in zip(*xy)]
res = -1
for i in range(N):
    square = y[i] - x[i]
    if i == 0:
        sq_ = square
        pass
    else:
        if square != sq_:
            res = -1
            break
        else:
            res = square
print(res)
0