結果

問題 No.185 和風
ユーザー tookunn_1213tookunn_1213
提出日時 2015-06-06 19:37:27
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 187 bytes
コンパイル時間 39 ms
コンパイル使用メモリ 6,588 KB
実行使用メモリ 6,092 KB
最終ジャッジ日時 2023-09-20 19:33:55
合計ジャッジ時間 640 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

N = int(raw_input())
ans = -1
for i in range(N):
	x,y = map(int,raw_input().split())
	if i == 0:
		ans = y - x;
	else:
		if ans != y - x:
			ans = -1
			break
print -1 if ans < 0 else ans
0