freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-269-polynomials-with-at-least-one-integer-root.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

972 B

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f4791000cf542c50ff8c Problem 269: Polynomials with at least one integer root 5 301918 problem-269-polynomials-with-at-least-one-integer-root

--description--

A root or zero of a polynomial P(x) is a solution to the equation P(x) = 0.

Define Pn as the polynomial whose coefficients are the digits of n.

For example, P5703(x) = 5x3 + 7x2 + 3.

We can see that:Pn(0) is the last digit of n, Pn(1) is the sum of the digits of n, Pn(10) is n itself.Define Z(k) as the number of positive integers, n, not exceeding k for which the polynomial Pn has at least one integer root.

It can be verified that Z(100 000) is 14696.

What is Z(1016)?

--hints--

euler269() should return 1311109198529286.

assert.strictEqual(euler269(), 1311109198529286);

--seed--

--seed-contents--

function euler269() {

  return true;
}

euler269();

--solutions--

// solution required