There was a (possible) mistake in one of the test-cases.
Namely, for sides [3,3,2] I got [39, 71, 71], which has a total of 181. I mean, we really do use rounding and all that, but shouldn't the result satisfy the necessary angle sum condition?

Created at: Aug. 26, 2013, 11:02 p.m.; Updated at: Nov. 24, 2013, 9:38 p.m.