結果

問題 No.185 和風
ユーザー nisizawanisizawa
提出日時 2017-12-03 00:24:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 1,000 ms
コード長 201 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,676 KB
実行使用メモリ 7,928 KB
最終ジャッジ日時 2023-08-18 20:18:29
合計ジャッジ時間 787 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,764 KB
testcase_01 AC 18 ms
7,912 KB
testcase_02 AC 18 ms
7,872 KB
testcase_03 AC 19 ms
7,928 KB
testcase_04 AC 18 ms
7,740 KB
testcase_05 AC 15 ms
7,764 KB
testcase_06 AC 17 ms
7,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

for i in range(n):
    x, y = map(int, input().split())    
    na = y - x if y - x > 0 else -1
    
    if i == 0:
        a = na
    elif a > 0 and a != na:
        a = -1

print(a)
0