結果

問題 No.185 和風
ユーザー hkawa117hkawa117
提出日時 2015-09-07 22:45:42
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 229 bytes
コンパイル時間 344 ms
コンパイル使用メモリ 6,652 KB
実行使用メモリ 6,096 KB
最終ジャッジ日時 2023-09-26 10:02:37
合計ジャッジ時間 991 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 RE -
testcase_03 WA -
testcase_04 RE -
testcase_05 RE -
testcase_06 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(raw_input())
g = set([])
for i in range(N):
    x, y = map(int, raw_input().split())
    if x >= y:
        print -1
        break
    else:
        g.add(x - y)
        if len(g) > 1:
            print -1

print g.pop()
0