45 lines
863 B
Markdown
45 lines
863 B
Markdown
---
|
|
id: 5900f5361000cf542c510049
|
|
title: 'Problema 458: Permutazioni di Project'
|
|
challengeType: 5
|
|
forumTopicId: 302132
|
|
dashedName: problem-458-permutations-of-project
|
|
---
|
|
|
|
# --description--
|
|
|
|
Considera l' alfabeto $A$ composto dalle lettere della parola `project`: $A = \\{c, e, j, o, p, r, t\\}$.
|
|
|
|
Sia $T(n)$ il numero di stringhe di lunghezza $n$ formate da lettere di $A$ che non hanno una sottostringa che è una delle 5040 permutazioni di `project`.
|
|
|
|
$T(7) = 7^7 - 7! = 818\\,503$.
|
|
|
|
Trova $T({10}^{12})$. Dai le ultime 9 cifre della tua risposta.
|
|
|
|
# --hints--
|
|
|
|
`permutationsOfProject()` dovrebbe restituire `423341841`.
|
|
|
|
```js
|
|
assert.strictEqual(permutationsOfProject(), 423341841);
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```js
|
|
function permutationsOfProject() {
|
|
|
|
return true;
|
|
}
|
|
|
|
permutationsOfProject();
|
|
```
|
|
|
|
# --solutions--
|
|
|
|
```js
|
|
// solution required
|
|
```
|