Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Inscribed Square and Triangle

Limits 1s, 512 MB

Observe the following drawing…. You’re given the area of the circle centered at L as in the image and a number that denotes the proportion of area of circles [Proportion = Area(circle of center O) / Area(circle of center L)].

Write a program that will calculate the area of ABCD quadrilateral and BPQ triangle [Shown in the image].

Input

Input contains only only two floating point number separated by a single space.

Constraints:

You are to take double precision numbers as input. Consider ℼ=arccos(-1).

Output

Area of Triangle

Area of quadrilateral

Sample

InputOutput
314.15926535897932384626433832795 3.00
100
600

Problem Setter: Niloy Sarker


    Discussion
    Statistics

    73% Solution Ratio

    sam4i40Earliest, 3M ago

    sam4i40Fastest, 0.0s

    tanimahossainLightest, 0 B

    nstucsteShortest, 154B

    Submit

    Login to submit