結果
| 問題 |
No.185 和風
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-27 16:42:02 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 61 ms / 1,000 ms |
| コード長 | 267 bytes |
| コンパイル時間 | 346 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 61,184 KB |
| 最終ジャッジ日時 | 2024-11-07 20:37:08 |
| 合計ジャッジ時間 | 1,217 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
ソースコード
N = int(input())
x, y = map(int, input().split())
ans = y - x
if ans <= 0:
print(-1)
exit()
for i in range(N - 1):
x, y = map(int, input().split())
if y - x != ans:
print(-1)
exit()
print(ans)