Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for The Angles of a Triangle by quarkov
from math import *
def checkio(a: int, b: int, c: int):
a, b, c = sorted([a, b, c])
if c >= a + b:
return [0, 0, 0]
ribs = [[a, b, c], [b, c, a], [c, a, b]]
result = []
for rib in ribs:
x, y, z = rib
result.append(round(degrees(acos((x*x + y*y - z*z) / (2*x*y)))))
return sorted(result)
July 5, 2018
Comments: