結果

問題 No.185 和風
ユーザー akihito0000
提出日時 2016-08-14 00:04:55
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 278 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2024-11-07 16:33:41
合計ジャッジ時間 711 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
# -*- coding: utf-8 -*-

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