結果

問題 No.185 和風
ユーザー ktshunktshun
提出日時 2015-05-28 16:04:21
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 259 bytes
コンパイル時間 47 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 6,124 KB
最終ジャッジ日時 2023-09-20 17:07:30
合計ジャッジ時間 741 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
6,124 KB
testcase_01 AC 15 ms
6,040 KB
testcase_02 AC 12 ms
5,952 KB
testcase_03 AC 12 ms
5,972 KB
testcase_04 AC 11 ms
5,996 KB
testcase_05 WA -
testcase_06 AC 13 ms
6,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding:utf-8 -*-
import sys

if __name__ == "__main__":
	n = input()
	for i in xrange(n):
		a,b = map(int,raw_input().split())
		if b - a < 0:
			print -1
			sys.exit()
		if i == 0:
			c = b-a
		else:
			if b-a != c:
				print -1
				sys.exit()
	print c
0