chore(i18n,learn): processed translations (#45299)

This commit is contained in:
camperbot
2022-03-01 21:39:26 +05:30
committed by GitHub
parent c6ec2512ad
commit d62fec495b
61 changed files with 752 additions and 606 deletions

View File

@ -1,6 +1,6 @@
---
id: 5900f4991000cf542c50ffab
title: 'Problem 301: Nim'
title: 'Problema 301: Nim'
challengeType: 5
forumTopicId: 301955
dashedName: problem-301-nim
@ -8,29 +8,34 @@ dashedName: problem-301-nim
# --description--
Nim is a game played with heaps of stones, where two players take it in turn to remove any number of stones from any heap until no stones remain.
Nim è un gioco giocato con pile di pietre, dove due giocatori si alternano a rimuovere qualsiasi numero di pietre da qualsiasi pila fino a quando non rimangono più pietre.
We'll consider the three-heap normal-play version of Nim, which works as follows:
Considereremo la versione del gioco normale a tre pile di Nim, che funziona come segue:
- At the start of the game there are three heaps of stones.
- On his turn the player removes any positive number of stones from any single heap.
- The first player unable to move (because no stones remain) loses.
- All'inizio del gioco ci sono tre cumuli di pietre.
- Al suo turno il giocatore rimuove qualsiasi numero positivo di pietre da qualsiasi mucchio singolo.
- Il primo giocatore non in grado di muovere (perché non ci sono pietre rimaste) perde.
If (n1,n2,n3) indicates a Nim position consisting of heaps of size n1, n2 and n3 then there is a simple function X(n1,n2,n3) — that you may look up or attempt to deduce for yourself — that returns: zero if, with perfect strategy, the player about to move will eventually lose; or non-zero if, with perfect strategy, the player about to move will eventually win. For example X(1,2,3) = 0 because, no matter what the current player does, his opponent can respond with a move that leaves two heaps of equal size, at which point every move by the current player can be mirrored by his opponent until no stones remain; so the current player loses. To illustrate:
Se ($n_1$, $n_2$, $n_3$) indica una posizione Nim consistente in cumuli di dimensione $n_1$, $n_2$ e $n_3$ c'è una funzione semplice $X(n_1,n_2, _3)$ — che si può cercare o tentare di dedurre da sé — che restituisce:
- current player moves to (1,2,1)
- opponent moves to (1,0,1)
- current player moves to (0,0,1)
- opponent moves to (0,0,0), and so wins.
- zero se, con una strategia perfetta, il giocatore che sta per muovere alla fine perdere; o
- non zero se, con una strategia perfetta, il giocatore in procinto di muovere alla fine vincerà.
For how many positive integers n ≤ 230 does X(n,2n,3n) = 0 ?
Per esempio $X(1, 2, 3) = 0$ perché, indipendentemente da ciò che fa il giocatore attuale, il suo avversario può rispondere con una mossa che lascia due cumuli di uguale dimensione, e a punto ogni mossa dal giocatore attuale può essere specchiata dal suo avversario fino a quando non rimangano pietre; così il giocatore attuale perde. Per illustrare:
- il giocatore corrente muove a (1,2,1)
- l'avversario muove a (1,0,1)
- il giocatore corrente muove a (0,0,1)
- l'avversario muove a (0,0,0), e così vince.
Per quanti interi positivi $n ≤ 2^{30}$ si ottiene $X(n, 2n, 3n) = 0$?
# --hints--
`euler301()` should return 2178309.
`nim()` dovrebbe restituire `2178309`.
```js
assert.strictEqual(euler301(), 2178309);
assert.strictEqual(nim(), 2178309);
```
# --seed--
@ -38,12 +43,12 @@ assert.strictEqual(euler301(), 2178309);
## --seed-contents--
```js
function euler301() {
function nim() {
return true;
}
euler301();
nim();
```
# --solutions--