結果

問題 No.185 和風
ユーザー minezumu
提出日時 2018-07-22 09:38:59
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 1,000 ms
コード長 278 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-12-26 05:08:06
合計ジャッジ時間 755 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
L = []
counter = 0
for i in range(N) :
    X,Y = map(int,input().split())
    Z = Y-X
    if Z > 0 :
        L.append(Z)
    else :
        counter += 1
        L.append(Z)
a = L[0]
b = L.count(a)
if b == N and counter == 0 :
    print(a)
else :
    print(-1)

0