2018-10-10 18:03:03 -04:00
|
|
|
|
---
|
|
|
|
|
id: 5900f48a1000cf542c50ff9d
|
2020-12-16 00:37:30 -07:00
|
|
|
|
title: 问题286:计分概率
|
2018-10-10 18:03:03 -04:00
|
|
|
|
challengeType: 5
|
|
|
|
|
videoUrl: ''
|
2021-01-13 03:31:00 +01:00
|
|
|
|
dashedName: problem-286-scoring-probabilities
|
2018-10-10 18:03:03 -04:00
|
|
|
|
---
|
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --description--
|
|
|
|
|
|
2020-02-18 01:40:55 +09:00
|
|
|
|
447/5000
|
2020-12-16 00:37:30 -07:00
|
|
|
|
|
2020-02-18 01:40:55 +09:00
|
|
|
|
芭芭拉(Barbara)是数学家和篮球运动员。 她发现从距离x射击时给一个点评分的概率正好是(1 -x / q),其中q是大于50的实常数。
|
|
|
|
|
|
|
|
|
|
在每次练习中,她从x = 1,x = 2,...,x = 50的距离射击,并且根据她的记录,她恰好有2%的机会总得分为20分。
|
|
|
|
|
|
|
|
|
|
找出q并将答案四舍五入到小数点后十位。
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --hints--
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
`euler286()`应该返回52.6494571953。
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
|
|
|
|
```js
|
2020-12-16 00:37:30 -07:00
|
|
|
|
assert.strictEqual(euler286(), 52.6494571953);
|
2018-10-10 18:03:03 -04:00
|
|
|
|
```
|
|
|
|
|
|
2021-01-13 03:31:00 +01:00
|
|
|
|
# --seed--
|
|
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
function euler286() {
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
euler286();
|
|
|
|
|
```
|
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --solutions--
|
2020-08-13 17:24:35 +02:00
|
|
|
|
|
2021-01-13 03:31:00 +01:00
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|