Limits 1s, 256 MB

The International Collegiate Programming Contest (ICPC) is a prestigious contest held all over the world. The competition features questions covering various topics.

Nobita, Shizuka, and Doraemon are very good friends. They were participating in ICPC this year. Shizuka noticed something odd about the envelope containing the problem set — it was triangular in shape. They found it interesting because envelopes are typically rectangular. Shizuka knew the area and base of the envelope and asked Nobita to find the height of the envelope.

Because Nobita isn't great at geometry, he asked Doraemon for help. Doraemon said it was easy and shared some triangle tips. Nobita got the formula and began figuring out the envelope's height.

Now, Nobita wants to verify if his calculation is correct. Nobita gave you the area AA and base BB of the triangular envelope. Can you write a program to determine the height of the envelope and assist Nobita in confirming his answers?

Note: area=0.5baseheightarea = 0.5 * base * height


The single line of input contains two Real values AA - the area of the envelope and BB - the base of the envelope.

1.0A12000.01.0 \leq A \leq 12000.0

1.0B160.01.0 \leq B \leq 160.0


Print a Real value - The height of the envelope. The value calculated must be presented with at least 44 digits after the decimal point.


4.3146  2.3456
23.8073  5.4321

Don’t forget to print newline ‘\n’ and not any extra spaces.


Login to submit.


93% Solution Ratio
Avik_AB17Earliest, 5M ago
sami.4726Fastest, 0.0s
Tahmidul.4404Lightest, 5.1 MB
Marzuq01Shortest, 47B
Toph uses cookies. By continuing you agree to our Cookie Policy.