結果

問題 No.185 和風
ユーザー soupesuteakasoupesuteaka
提出日時 2016-03-03 15:51:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 29 ms / 1,000 ms
コード長 367 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 11,848 KB
実行使用メモリ 10,216 KB
最終ジャッジ日時 2023-10-24 19:39:28
合計ジャッジ時間 822 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,112 KB
testcase_01 AC 28 ms
10,216 KB
testcase_02 AC 28 ms
10,208 KB
testcase_03 AC 28 ms
10,208 KB
testcase_04 AC 28 ms
10,216 KB
testcase_05 AC 27 ms
10,080 KB
testcase_06 AC 28 ms
10,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding: UTF-8

import sys
import re
import itertools
from math import log
from collections import deque

### defs ###


### main ###
N = int(sys.stdin.readline())
XY = []
for _ in range(N):
	x,y = map(int,sys.stdin.readline().split())
	XY.append((x,y))

m = XY[0][1]-XY[0][0]
if (len(list(filter(lambda x:x[1]-x[0]==m, XY)))==N and m > 0):
	print(m)
else:
	print(-1)
0