739 B
739 B
id, title, challengeType, videoUrl
id | title | challengeType | videoUrl |
---|---|---|---|
5900f3931000cf542c50fea6 | 问题39:整数直角三角形 | 5 |
--description--
如果p是具有整数长度边的直角三角形的周长{a,b,c},则对于p = 120,恰好有三个解。{20,48,52},{24,45,51},{ 30,40,50}对于p≤n的值,最大化解的数量是多少?
--hints--
intRightTriangles(500)
应该返回420。
assert(intRightTriangles(500) == 420);
intRightTriangles(800)
应该返回420。
assert(intRightTriangles(800) == 720);
intRightTriangles(900)
应该返回840。
assert(intRightTriangles(900) == 840);
intRightTriangles(1000)
应该返回840。
assert(intRightTriangles(1000) == 840);