2018-09-30 22:01:58 +00:00
---
id: 5900f5331000cf542c510046
challengeType: 5
title: 'Problem 455: Powers With Trailing Digits'
---
## Description
< section id = 'description' >
Let f(n) be the largest positive integer x less than 109 such that the last 9 digits of nx form the number x (including leading zeros), or zero if no such integer exists.
For example:
2018-10-08 00:01:53 +00:00
f(4) = 411728896 (4411728896 = ...490411728896)
2018-09-30 22:01:58 +00:00
f(10) = 0
f(157) = 743757 (157743757 = ...567000743757)
Σf(n), 2 ≤ n ≤ 103 = 442530011399
Find Σf(n), 2 ≤ n ≤ 106.
< / section >
## Instructions
< section id = 'instructions' >
< / section >
## Tests
< section id = 'tests' >
```yml
2018-10-04 13:37:37 +00:00
tests:
- text: < code > euler455()</ code > should return 450186511399999.
2018-10-20 18:02:47 +00:00
testString: assert.strictEqual(euler455(), 450186511399999, '< code > euler455()< / code > should return 450186511399999.');
2018-09-30 22:01:58 +00:00
```
< / section >
## Challenge Seed
< section id = 'challengeSeed' >
< div id = 'js-seed' >
```js
function euler455() {
// Good luck!
return true;
}
euler455();
```
< / div >
< / section >
## Solution
< section id = 'solution' >
```js
// solution required
```
< / section >