Skip to content

Ever since the departure of all professionals to Ireland, mathematicians have been painting. They set up ladders and they were about to start with a brush when they suddenly became fascinated by the geometric layout that was created between the buildings as in the picture below: /view/ProblemMapping/5162993/statement_files/malarze.png/malarze.pn…

Notifications You must be signed in to change notification settings

lukaszpasek/ALGO_CO1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ALGO_CO1

Ever since the departure of all professionals to Ireland, mathematicians have been painting. They set up ladders and they were about to start with a brush when they suddenly became fascinated by the geometric layout that was created between the buildings.

One of the ladders has length π‘₯, second drab and are based on opposite buildings. When we look from the side, they intersect at the height 𝑐 above street level. Mathematicians soon realized that on the basis of these values ​​they can calculate the width of the street 𝑀. Their fascination reached its zenith when a colleague passing by next informed them that you could write a program that would do it.

Entrance The first line of the standard input contains the natural number 𝑍 - the number of data sets. The description of one set is as follows: One line containing 3 positive real numbers π‘₯, 𝑦 and 𝑐 not greater than 1000. You can assume that they correspond to a realizable geometric situation.
Exit For each data set, write a line containing the street width, given with an accuracy of 3 decimal places. Example For input data:
4
30 40 10
12.619429 8.163332 3
10 10 3
10 10 1
The correct answer is:
26033
7,000
8,000
9.798

About

Ever since the departure of all professionals to Ireland, mathematicians have been painting. They set up ladders and they were about to start with a brush when they suddenly became fascinated by the geometric layout that was created between the buildings as in the picture below: /view/ProblemMapping/5162993/statement_files/malarze.png/malarze.pn…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages