* fix: Chinese test suite Add localeTiltes, descriptions, and adjust test text and testStrings to get the automated test suite working. * fix: ran script, updated testStrings and solutions
1.4 KiB
1.4 KiB
id, challengeType, title, videoUrl, localeTitle
id | challengeType | title | videoUrl | localeTitle |
---|---|---|---|---|
5900f48a1000cf542c50ff9c | 5 | Problem 285: Pythagorean odds | 问题285:毕达哥拉斯赔率 |
Description
例如,如果k = 6,a = 0.2,b = 0.85,则(k·a + 1)2 ++(k·b + 1)2 = 42.05。 42.05的平方根是6.484 ...,四舍五入到最接近的整数后,它变为6。 这等于k,因此他得到6分。
可以看出,如果他以k = 1,k = 2,...,k = 10进行10圈,则他的总得分的期望值四舍五入到小数点后五位。
如果他以k = 1,k = 2,k = 3,...,k = 105进行105转,他的总得分的期望值是多少,四舍五入到小数点后五位?
Instructions
Tests
tests:
- text: <code>euler285()</code>应该返回157055.80999。
testString: assert.strictEqual(euler285(), 157055.80999);
Challenge Seed
function euler285() {
// Good luck!
return true;
}
euler285();
Solution
// solution required