WEBSITE RETURNED, HOWEVER SUBMIT QUANTITY IS RESTRICTED PER DAY TO VERY LITTLE (UNDER JUDGE0 NEW POLICY, API PROVIDER). Therefore it is very much for you to pay attention TEST CAREFULLY CODE BEFORE SUBMIT.

triangle

Threads: Write a program to 3 number a, b, c. Check if a, b, c Is 3 edge of the triangle is not? If 3 edge of the triangle, the triangle area calculation formula: S = \sqrt{p(p-a)(p-b)(p-c)} where p is half the perimeter of the triangle. p = \frac{a+b+c}{2}
Input: A line of 3 numbers separated by spaces.
Output:
1/ If 3 forming triangular edges, print out a line of 2 numbers separated by a space are the perimeter and area of ​​triangles. Rounded to 2 decimal.
2/ If 3 not forming triangular edges, printed word “NO”.

For example:

input:
3 4 5
output:
12.00 6.00

You are not logged in? Log in to Submit Now!

22 Comments

Add a Comment