PROBLEM LINK:
Author: Ranjan Kumar Singh
Tester: Ved Prakash
Editorialist: Sudipto Roy
DIFFICULTY:
Simple
PRE-REQUISITES:
Basic Maths
PROBLEM:
To find the radius of the circumcircle from the given sides of the triangle.
EXPLANATION:
If a,b and c are the three sides of a triangle then, from the given sides of the triangle, radius of the circumcircle is found by a × b × c/{sqrt((a+b+c)×(b+c-a)×(c+a-b)×(a+b-c))}.
Pseudo Code:
r=(a*b*c)/sqrt((a+b+c)*(b+c-a)*(c+a-b)*(a+b-c))
Complexity: O(1).