結果

問題 No.185 和風
ユーザー first_vilfirst_vil
提出日時 2020-07-29 16:07:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 1,000 ms
コード長 196 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 10,724 KB
実行使用メモリ 8,252 KB
最終ジャッジ日時 2023-09-11 10:42:56
合計ジャッジ時間 848 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,804 KB
testcase_01 AC 19 ms
7,832 KB
testcase_02 AC 18 ms
8,052 KB
testcase_03 AC 17 ms
8,224 KB
testcase_04 AC 16 ms
8,036 KB
testcase_05 AC 17 ms
8,252 KB
testcase_06 AC 18 ms
7,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=[0]*n
for i in range(n):
    x,y=map(int,input().split())
    if x>=y:
        print(-1)
        exit(0)
    a[i]=y-x
a=set(a)
if len(a)==1:
    print(a.pop())
else:
    print(-1)
0