chore(i18n,learn): processed translations (#45333)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f4f31000cf542c510006
|
||||
title: 'Problem 391: Hopping Game'
|
||||
title: 'Problema 391: Gioco salterino'
|
||||
challengeType: 5
|
||||
forumTopicId: 302056
|
||||
dashedName: problem-391-hopping-game
|
||||
@ -8,28 +8,35 @@ dashedName: problem-391-hopping-game
|
||||
|
||||
# --description--
|
||||
|
||||
Let sk be the number of 1’s when writing the numbers from 0 to k in binary.
|
||||
Sia $s_k$ il numero di 1 quando scriviamo i numeri da 0 a $k$ in binario.
|
||||
|
||||
For example, writing 0 to 5 in binary, we have 0, 1, 10, 11, 100, 101. There are seven 1’s, so s5 = 7.
|
||||
Per esempio, scrivendo da 0 a 5 in binario, abbiamo 0, 1, 10, 11, 100, 101. Ci sono sette 1, quindi $s_5 = 7$.
|
||||
|
||||
The sequence S = {sk : k ≥ 0} starts {0, 1, 2, 4, 5, 7, 9, 12, ...}.
|
||||
La sequenza $S = \\{s_k : k ≥ 0\\}$ inizia con $\\{0, 1, 2, 4, 5, 7, 9, 12, \ldots\\}$.
|
||||
|
||||
A game is played by two players. Before the game starts, a number n is chosen. A counter c starts at 0. At each turn, the player chooses a number from 1 to n (inclusive) and increases c by that number. The resulting value of c must be a member of S. If there are no more valid moves, the player loses.
|
||||
Un gioco è giocato da due giocatori. Prima dell'inizio della partita, viene scelto il numero $n$. Un contatore $c$ inizia a 0. Ad ogni turno, il giocatore sceglie un numero da 1 a $n$ (incluso) e aumenta $c$ di quel numero. Il valore risultante di $c$ deve essere un membro di $S$. Se non ci sono più mosse valide, il giocatore perde.
|
||||
|
||||
For example: Let n = 5. c starts at 0. Player 1 chooses 4, so c becomes 0 + 4 = 4. Player 2 chooses 5, so c becomes 4 + 5 = 9. Player 1 chooses 3, so c becomes 9 + 3 = 12. etc. Note that c must always belong to S, and each player can increase c by at most n.
|
||||
Ad esempio, con $n = 5$ e a partire da $c = 0$:
|
||||
|
||||
Let M(n) be the highest number the first player can choose at her first turn to force a win, and M(n) = 0 if there is no such move. For example, M(2) = 2, M(7) = 1 and M(20) = 4.
|
||||
- Il giocatore 1 sceglie 4, quindi $c$ diventa $0 + 4 = 4$.
|
||||
- Il giocatore 2 sceglie 5, quindi $c$ diventa $4 + 5 = 9$.
|
||||
- Il giocatore 1 sceglie 3, quindi $c$ diventa $9 + 3 = 12$.
|
||||
- ecc.
|
||||
|
||||
Given Σ(M(n))3 = 8150 for 1 ≤ n ≤ 20.
|
||||
Nota che $c$ deve sempre appartenere a $S$ e ogni giocatore può aumentare $c$ al massimo di $n$.
|
||||
|
||||
Find Σ(M(n))3 for 1 ≤ n ≤ 1000.
|
||||
Sia $M(n)$ il numero più alto che il primo giocatore può scegliere al suo primo turno per forzare una vittoria, e $M(n) = 0$ se non c'è una mossa del genere. Per esempio, $M(2) = 2$, $M(7) = 1$ e $M(20) = 4$.
|
||||
|
||||
Si può verificare che $\sum M{(n)}^3 = 8150$ per $1 ≤ n ≤ 20$.
|
||||
|
||||
Trova $\sum M{(n)}^3$ per $1 ≤ n ≤ 1000$.
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler391()` should return 61029882288.
|
||||
`hoppingGame()` dovrebbe restituire `61029882288`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler391(), 61029882288);
|
||||
assert.strictEqual(hoppingGame(), 61029882288);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -37,12 +44,12 @@ assert.strictEqual(euler391(), 61029882288);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler391() {
|
||||
function hoppingGame() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler391();
|
||||
hoppingGame();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
Reference in New Issue
Block a user