結果

問題 No.185 和風
ユーザー nisizawa
提出日時 2017-12-03 00:24:56
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 34 ms / 1,000 ms
コード長 201 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-11-28 04:05:56
合計ジャッジ時間 937 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

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