Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for The Angles of a Triangle by TovarischZhukov
# migrated from python 2.7
import math
def checkio(a, b, c):
lines= [a,b,c]
m = max(lines)
lines.remove(m)
if m > sum(lines):
return [0,0,0]
retval=[]
retval.append(math.degrees(math.acos((a**2+b**2-c**2)/float(2*a*b))))
retval.append(math.degrees(math.acos((a**2+c**2-b**2)/float(2*a*c))))
retval.append(math.degrees(math.acos((b**2+c**2-a**2)/float(2*b*c))))
retval = list(map(round, retval))
return sorted(map(int, retval)) if int(sum(retval))==180 and (0 not in retval) else [0,0,0]
Dec. 15, 2015