Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Angles of a Triangle by jacekgrycza
import math
def checkio(a, b, c):
w=sorted([a,b,c])
if w[0]+w[1]<=w[2]:
return [0,0,0]
x=int(180*math.acos((a*a+b*b-c*c)/(2*a*b))/math.pi+0.5)
y=int(180*math.acos((b*b+c*c-a*a)/(2*b*c))/math.pi+0.5)
z=int(180*math.acos((c*c+a*a-b*b)/(2*c*a))/math.pi+0.5)
return (sorted([x,y,z]))
Oct. 20, 2016