chore(i18n,curriculum): update translations (#44255)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f4f31000cf542c510006
|
||||
title: 'Problem 391: Hopping Game'
|
||||
title: 'Problema 391: Jogo de saltos'
|
||||
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.
|
||||
Considere $s_k$ como o número de 1s ao escrever os números de 0 a $k$ em binário.
|
||||
|
||||
For example, writing 0 to 5 in binary, we have 0, 1, 10, 11, 100, 101. There are seven 1’s, so s5 = 7.
|
||||
Por exemplo, escrevendo de 0 a 5 em binário, temos 0, 1, 10, 11, 100 e 101. São sete números 1, portanto $s_5 = 7$.
|
||||
|
||||
The sequence S = {sk : k ≥ 0} starts {0, 1, 2, 4, 5, 7, 9, 12, ...}.
|
||||
A sequência $S = \\{s_k : k ≥ 0\\}$ começa com $\\{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.
|
||||
Dois jogadores jogam. Antes de o jogo começar, um número $n$ é selecionado. Um contador $c$ começa em 0. A cada turno, o jogador escolhe um número de 1 a $n$ (inclusive) e aumenta $c$ por aquele número. O valor resultante de $c$ deve pertencer a $S$. Se não houver mais movimentos válidos, o jogador 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.
|
||||
Por exemplo, com $n = 5$ e começando com $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.
|
||||
- O jogador 1 escolhe 4, então $c$ passa a ser $0 + 4 = 4$.
|
||||
- O jogador 2 escolhe 5, então $c$ passa a ser $4 + 5 = 9$.
|
||||
- O jogador 1 escolhe 3, então $c$ passa a ser $9 + 3 = 12$.
|
||||
- etc.
|
||||
|
||||
Given Σ(M(n))3 = 8150 for 1 ≤ n ≤ 20.
|
||||
Observe que $c$ deve sempre pertencer a $S$ e que cada jogador pode aumentar $c$ em, no máximo, $n$.
|
||||
|
||||
Find Σ(M(n))3 for 1 ≤ n ≤ 1000.
|
||||
Considere $M(n)$ como o maior número que o primeiro jogador pode escolher em sua primeira jogada para forçar uma vitórias, e que $M(n) = 0$ se esse movimento não existir. Por exemplo, $M(2) = 2$, $M(7) = 1$ e $M(20) = 4$.
|
||||
|
||||
Pode-se verificar que $\sum M{(n)}^3 = 8150$ para $1 ≤ n ≤ 20$.
|
||||
|
||||
Encontre a $\sum M{(n)}^3$ para $1 ≤ n ≤ 1000$.
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler391()` should return 61029882288.
|
||||
`hoppingGame()` deve retornar `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