結果

問題 No.185 和風
ユーザー あかりきあかりき
提出日時 2021-02-09 22:07:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 91 ms / 1,000 ms
コード長 205 bytes
コンパイル時間 389 ms
コンパイル使用メモリ 87,116 KB
実行使用メモリ 76,468 KB
最終ジャッジ日時 2023-09-21 09:58:13
合計ジャッジ時間 1,671 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,472 KB
testcase_01 AC 85 ms
76,052 KB
testcase_02 AC 83 ms
76,244 KB
testcase_03 AC 88 ms
75,980 KB
testcase_04 AC 91 ms
76,244 KB
testcase_05 AC 71 ms
71,428 KB
testcase_06 AC 90 ms
76,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
l=[list(map(int,input().split())) for i in range(n)]
ans=[]
for i in range(n):
  ans.append(l[i][1]-l[i][0])
ans=list(set(ans))
if len(ans)==1 and ans[0]>0:
  print(ans[0])
else:
  print(-1)
0