結果

問題 No.185 和風
ユーザー steek79steek79
提出日時 2015-10-13 00:34:12
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 242 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 6,480 KB
実行使用メモリ 6,072 KB
最終ジャッジ日時 2023-09-28 12:43:26
合計ジャッジ時間 757 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,012 KB
testcase_01 AC 14 ms
5,964 KB
testcase_02 AC 11 ms
5,948 KB
testcase_03 AC 11 ms
5,952 KB
testcase_04 AC 11 ms
5,956 KB
testcase_05 WA -
testcase_06 AC 14 ms
6,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()

ans = None
for n in xrange(N):
    x, y = map(int, raw_input().split())
    if y - x < 0:
        print -1
        exit()
    elif ans == None:
        ans = y - x
    elif ans != y - x:
        print -1
        exit()

print ans
0