I would like to give some feedback about
the test instance checkio(3,4,5),the website interpreter will return[36,53,91] but my PC will return the right answer [37,53,90]
my code:
def checkio(a, b, c):
import math
largest = max(a, b, c)
if largest >= a + b + c - largest:
return [0, 0, 0]
cos1 = (a*a + b*b - c*c)/(2*a*b)
cos2 = (a*a + c*c - b*b)/(2*a*c)
angle1 = int(math.degrees(math.acos(cos1)))
angle2 = int(math.degrees(math.acos(cos2)))
angle3 = 180 - angle1 - angle2
return sorted([angle1, angle2, angle3])
From: https://py.checkio.org/mission/triangle-angles/solve/
HTTP_USER_AGENT:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Created at: Oct. 16, 2016, 7:43 a.m.; Updated at: Oct. 16, 2016, 8:10 p.m.