QOJ.ac

QOJ

حد الوقت: 1 s حد الذاكرة: 512 MB مجموع النقاط: 100

#980. 新財政年度

الإحصائيات

Naomi 過去一年都在追蹤她的甜甜圈銷售狀況。由於口味眾多,有些口味的銷量勢必會比其他口味更好。為了讓來年的銷售額最大化,她記錄了每種口味的特定資訊。她總共追蹤了 $N$ 種不同的甜甜圈口味。對於每一種口味,她記錄了 $O$(原始價格)、$P$(新價格)以及 $C$(價格的相對變化)。價格的相對變化是使用公式 $C = 100\% \cdot (P - O) / O$ 計算得出的。

不幸的是,在某個深夜分析數據時,她不小心把咖啡灑在了記錄每種甜甜圈口味原始價格的頁面上。

你能幫 Lesley 恢復她的數據,特別是每種甜甜圈口味的原始價格 $O$ 嗎?

輸入格式

第一行包含一個整數 $N$,代表甜甜圈的口味數量 ($1 \le N \le 10^4$)。

接下來的 $N$ 行,每行描述一種口味,包含兩個實數 $P$ 和 $C$ ($1 \le P \le 1000.00$, $-1000.00 \le C \le 1000.00$),數值精確到小數點後兩位。

輸出格式

輸出 $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.