56 lines
1.1 KiB
Markdown
56 lines
1.1 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包含50次成功的登录尝试。鉴于总是按顺序询问三个字符,分析该文件以确定未知长度的最短可能秘密密码。 </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>
|