結果

問題 No.185 和風
ユーザー first_vilfirst_vil
提出日時 2020-07-29 16:02:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 193 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 8,192 KB
最終ジャッジ日時 2023-09-11 10:17:29
合計ジャッジ時間 831 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 18 ms
7,792 KB
testcase_02 AC 16 ms
8,156 KB
testcase_03 AC 16 ms
8,108 KB
testcase_04 AC 16 ms
8,092 KB
testcase_05 AC 15 ms
8,192 KB
testcase_06 RE -
権限があれば一括ダウンロードができます

ソースコード

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[0])
else:
    print(-1)
0