Files
freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-398-cutting-rope.russian.md

55 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4fa1000cf542c51000d
challengeType: 5
title: 'Problem 398: Cutting rope'
videoUrl: ''
localeTitle: 'Задача 398: Режущая веревка'
---
## Description
<section id="description"> Внутри веревки длиной n n-1 точки помещаются с расстоянием 1 друг от друга и от конечных точек. Среди этих точек мы выбираем m-1 точек случайным образом и разрезаем веревку в этих точках, чтобы создать m сегментов. <p> Пусть E (n, m) - ожидаемая длина второго младшего сегмента. Например, E (3, 2) = 2 и E (8, 3) = 16/7. Обратите внимание, что если несколько сегментов имеют одинаковую кратчайшую длину, длина второго младшего сегмента определяется как кратчайшая. </p><p> Найдите E (107, 100). Дайте ваш ответ округленным до 5 знаков после запятой за десятичной точкой. </p></section>
## Instructions
undefined
## Tests
<section id='tests'>
```yml
tests:
- text: ''
testString: 'assert.strictEqual(euler398(), 2010.59096, "<code>euler398()</code> should return 2010.59096.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler398() {
// Good luck!
return true;
}
euler398();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>