predictive-maintenance-python icon indicating copy to clipboard operation
predictive-maintenance-python copied to clipboard

calc

Open Folkdayz opened this issue 2 years ago • 0 comments

sides=[3,2,4,7,5,12,11,13,15,16,14,14] sides = sorted(sides, reverse=True) smax=0 for i in range(len(sides)): for j in range(i + 1, len(sides)): for k in range(j + 1, len(sides)): a = sides[i] b = sides[j] c = sides[k] ifa+b>canda+c>bandb+c>a: p=(a+b+c)/2 s=(p*(p-a)(p-b)(p-c))**(1/2) ifs>smax: smax=s print("Максимальная площадь треугольника", smax)

Folkdayz avatar Nov 09 '22 09:11 Folkdayz