56 lines
1.6 KiB
Markdown
56 lines
1.6 KiB
Markdown
---
|
||
id: 5900f3bb1000cf542c50fece
|
||
challengeType: 5
|
||
title: 'Problem 79: Passcode derivation'
|
||
videoUrl: ''
|
||
localeTitle: 'Проблема 79: Получение паролей'
|
||
---
|
||
|
||
## Description
|
||
<section id="description"> Общим методом защиты, используемым для онлайн-банкинга, является запрос пользователю о трех случайных символах из кода доступа. Например, если код доступа 531278, они могут запросить 2-й, 3-й и 5-й символы; ожидаемым ответом будет: 317. Текстовый файл keylog.txt содержит пятьдесят успешных попыток входа в систему. Учитывая, что три символа всегда запрашиваются по порядку, проанализируйте файл, чтобы определить максимально короткий секретный код неизвестной длины. </section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler79()</code> должен вернуть 73162890.
|
||
testString: 'assert.strictEqual(euler79(), 73162890, "<code>euler79()</code> should return 73162890.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler79() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler79();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|