結果

問題 No.185 和風
ユーザー yohei-kuyohei-ku
提出日時 2018-03-28 00:17:30
言語 Python2
(2.7.18)
結果
AC  
実行時間 15 ms / 1,000 ms
コード長 302 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 6,504 KB
実行使用メモリ 6,240 KB
最終ジャッジ日時 2023-09-07 19:14:02
合計ジャッジ時間 753 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
5,988 KB
testcase_01 AC 14 ms
6,164 KB
testcase_02 AC 15 ms
6,128 KB
testcase_03 AC 15 ms
6,192 KB
testcase_04 AC 15 ms
6,240 KB
testcase_05 AC 13 ms
5,968 KB
testcase_06 AC 15 ms
6,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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