56 lines
1.5 KiB
Markdown
56 lines
1.5 KiB
Markdown
---
|
||
id: 5900f49d1000cf542c50ffb0
|
||
challengeType: 5
|
||
title: 'Problem 305: Reflexive Position'
|
||
videoUrl: ''
|
||
localeTitle: 'Задача 305: Рефлексивное положение'
|
||
---
|
||
|
||
## Description
|
||
<section id="description"> Назовем S (бесконечной) строкой, которая создается путем конкатенации последовательных положительных целых чисел (начиная с 1), записанных в базе 10. Таким образом, S = 1234567891011121314151617181920212223242 ... <p> Легко видеть, что любое число будет отображаться бесконечно много раз в S. </p><p> Назовем f (n) исходной позицией n-го вхождения n в S. Например, f (1) = 1, f (5) = 81, f (12) = 271 и f (7780) = 111111365. </p><p> Найти Σf (3k) для 1≤k≤13. </p></section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler305()</code> должен вернуть 18174995535140.
|
||
testString: 'assert.strictEqual(euler305(), 18174995535140, "<code>euler305()</code> should return 18174995535140.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler305() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler305();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|