結果
| 問題 | No.185 和風 |
| コンテスト | |
| ユーザー |
iad_2889
|
| 提出日時 | 2019-05-02 03:33:16 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 34 ms / 1,000 ms |
| コード長 | 375 bytes |
| 記録 | |
| コンパイル時間 | 120 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-12-31 12:55:51 |
| 合計ジャッジ時間 | 1,065 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
ソースコード
N = int(input())
terms = [[int(x) for x in input().split()] for y in range(N)]
forecast = None
is_censored = True
for term in terms:
base,add = term
if base >= add:
break
fc = add - base
if not forecast:
forecast = fc
elif forecast != fc:
break
else:
is_censored = False
if is_censored:
forecast = -1
print(forecast)
iad_2889