結果

問題 No.185 和風
コンテスト
ユーザー yohei-ku
提出日時 2018-03-28 00:17:30
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 87 ms / 1,000 ms
コード長 302 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 140 ms
コンパイル使用メモリ 77,504 KB
最終ジャッジ日時 2025-12-04 01:05:48
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = input()
L =[]
for i in range(0,N):
    first = raw_input()
    split_first = first.split()
    X = int(split_first[0])
    Y = int(split_first[1])
    L.append(Y-X)
L=set(L)

if len(set(L)) == 1:
    L = list(L)
    if L[0] >= 1:
        print L[0]
    else:
        print -1
else:
    print -1    
0