Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-480-the-last-question.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

1.6 KiB

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f54c1000cf542c51005f Problem 480: The Last Question 5 302158 problem-480-the-last-question

--description--

Consider all the words which can be formed by selecting letters, in any order, from the phrase:

thereisasyetinsufficientdataforameaningfulanswer

Suppose those with 15 letters or less are listed in alphabetical order and numbered sequentially starting at 1.

The list would include:

1 : a

2 : aa

3 : aaa

4 : aaaa

5 : aaaaa

6 : aaaaaa

7 : aaaaaac

8 : aaaaaacd

9 : aaaaaacde

10 : aaaaaacdee

11 : aaaaaacdeee

12 : aaaaaacdeeee

13 : aaaaaacdeeeee

14 : aaaaaacdeeeeee

15 : aaaaaacdeeeeeef

16 : aaaaaacdeeeeeeg

17 : aaaaaacdeeeeeeh

...

28 : aaaaaacdeeeeeey

29 : aaaaaacdeeeeef

30 : aaaaaacdeeeeefe

...

115246685191495242: euleoywuttttsss

115246685191495243: euler

115246685191495244: eulera

...

525069350231428029: ywuuttttssssrrrDefine P(w) as the position of the word w.

Define W(p) as the word in position p.

We can see that P(w) and W(p) are inverses: P(W(p)) = p and W(P(w)) = w.

Examples:

W(10) = aaaaaacdee

P(aaaaaacdee) = 10

W(115246685191495243) = euler

P(euler) = 115246685191495243Find W(P(legionary) + P(calorimeters) - P(annihilate) + P(orchestrated) - P(fluttering)).

Give your answer using lowercase characters (no punctuation or space).

--hints--

euler480() should return turnthestarson.

assert.strictEqual(euler480(), turnthestarson);

--seed--

--seed-contents--

function euler480() {

  return true;
}

euler480();

--solutions--

// solution required