QOJ.ac

QOJ

Time Limit: 2.0 s Memory Limit: 256 MB Total points: 100 Hackable ✓

#18327. Tuesday Member Day

Statistics

"Tuesday Member Day, the second one is only 1 yuan, equivalent to 6.5 yuan per burger!"

A new burger shop opened at Lemon's school and released this promotional slogan. Lemon, who loves burgers, immediately took notice of the shop, but he missed the word "equivalent to" and completely misunderstood the meaning of the slogan.

The original intention of the slogan was: the original price of a burger without the discount is 12 yuan. When participating in the member day event, buying two burgers only requires paying "1 original price plus 1 yuan", totaling 13 yuan, which averages out to 6.5 yuan per burger.

However, Lemon did not see "equivalent to" and understood it as: the original price of a burger is 6.5 yuan, and the second one only costs an additional 1 yuan, so he could buy two burgers for 7.5 yuan.

Now, given the average price of a single burger after participating in the event as calculated by Lemon based on his misunderstanding, please calculate the original price of a burger without the discount.

Input

Each test file contains multiple test cases.

The first line contains an integer $T$ ($1 \le T \le 10^5$) representing the number of test cases. For each test case:

The only line contains a real number $x$ ($2 < x \le 4 \times 10^{16}$), representing the average price of a single burger after participating in the event according to Lemon's understanding.

It is guaranteed that $x$ contains a decimal point and has two digits after the decimal point.

Output

For each test case, output one line representing the original price of the burger without the discount.

Your answer must be formatted to two decimal places and must be exactly the same as the standard answer to be considered correct.

Examples

Input 1

3
3.75
111705.27
36028797018963968.01

Output 1

12.00
446818.08
144115188075855869.04

Note

Hint: Due to the way floating-point numbers are stored, they inevitably encounter precision issues in many cases. In practical applications, any error in handling money is intolerable: an error of 0.01 yuan can lead to unbalanced accounts and cause various problems. So, how should we handle this?

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.