QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 512 MB Total points: 100

#980. 新会計年度

Statistics

Naomiは昨年、ドーナツの売上を記録して過ごしました。非常に多くのフレーバーがあるため、売れ行きが良いものもあればそうでないものもあります。来年の売上を最大化するために、彼女は各フレーバーに関する特定の情報を記録しています。彼女はちょうど $N$ 種類のドーナツのフレーバーを記録しています。各フレーバーについて、彼女は元の価格 $O$、新しい価格 $P$、そして価格の相対変化 $C$ を記録しています。価格の相対変化は、以下の式を用いて計算されます。

$$C = 100\% \cdot (P - O) / O$$

残念なことに、ある夜遅く、データのクリップボードを分析していた際に、各ドーナツのフレーバーの元の価格が記録されていたページ全体にコーヒーをこぼしてしまいました。

Lesleyがデータを復元するのを手伝ってあげてください。具体的には、各ドーナツのフレーバーの元の価格 $O$ を求めてください。

入力

最初の行には、ドーナツのフレーバーの数 $N$ が含まれます ($1 \le N \le 10^4$)。

続く $N$ 行の各行は1つのフレーバーについて記述しており、2つの実数 $P$ と $C$ ($1 \le P \le 1000.00$, $-1000.00 \le C \le 1000.00$) が含まれています。これらは小数点以下2桁まで与えられます。

出力

$N$ 行出力してください。$i$ 行目には、$i$ 番目のドーナツのフレーバーの元の価格 $O$ を、絶対誤差または相対誤差が $10^{-5}$ 以下となるように出力してください。

入出力例

入力 1

2
100.00 10.50
50.00 -50.75

出力 1

90.497737557
101.522842640

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.