freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-415-titanic-sets.ru...

56 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 5900f50c1000cf542c51001e
challengeType: 5
title: 'Problem 415: Titanic sets'
videoUrl: ''
localeTitle: 'Проблема 415: Титанические наборы'
---
## Description
<section id="description"> Множество точек решетки S называется титаническим множеством, если существует прямая, проходящая через ровно две точки из S. <p> Примером титанического множества является S = {(0, 0), (0, 1), (0, 2), (1, 1), (2, 0), (1, 0)}, где прямая проходящие через (0, 1) и (2, 0), не проходят через любую другую точку из S. </p><p> С другой стороны, множество {(0, 0), (1, 1), (2, 2), (4, 4)} не является титаническим множеством, так как линия, проходящая через любые две точки множества, также проходит через два других. </p><p> Для любого натурального N пусть T (N) - число титанических множеств S, каждая точка (x, y) удовлетворяет 0 ≤ x, y ≤ N. Можно проверить, что T (1) = 11, T (2 ) = 494, T (4) = 33554178, T (111) mod 108 = 13500401 и T (105) mod 108 = 63259062. </p><p> Найдите T (1011) mod 108. </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler415()</code> должен вернуть 55859742.
testString: 'assert.strictEqual(euler415(), 55859742, "<code>euler415()</code> should return 55859742.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler415() {
// Good luck!
return true;
}
euler415();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>