Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-305-reflexive-position.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

886 B

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f49d1000cf542c50ffb0 Problem 305: Reflexive Position 5 301959 problem-305-reflexive-position

--description--

Let's call S the (infinite) string that is made by concatenating the consecutive positive integers (starting from 1) written down in base 10.

Thus, S = 1234567891011121314151617181920212223242...

It's easy to see that any number will show up an infinite number of times in S.

Let's call f(n) the starting position of the nth occurrence of n in S. For example, f(1)=1, f(5)=81, f(12)=271 and f(7780)=111111365.

Find ∑f(3k) for 1≤k≤13.

--hints--

euler305() should return 18174995535140.

assert.strictEqual(euler305(), 18174995535140);

--seed--

--seed-contents--

function euler305() {

  return true;
}

euler305();

--solutions--

// solution required