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

This commit is contained in:
camperbot
2022-03-04 19:46:29 +05:30
committed by GitHub
parent e24c8abc7f
commit 3d3972f2dd
113 changed files with 1394 additions and 1111 deletions

View File

@ -1,6 +1,6 @@
---
id: 5900f5171000cf542c510029
title: 'Problem 426: Box-ball system'
title: 'Problema 426: sistema scatola palla'
challengeType: 5
forumTopicId: 302096
dashedName: problem-426-box-ball-system
@ -8,26 +8,36 @@ dashedName: problem-426-box-ball-system
# --description--
Consider an infinite row of boxes. Some of the boxes contain a ball. For example, an initial configuration of 2 consecutive occupied boxes followed by 2 empty boxes, 2 occupied boxes, 1 empty box, and 2 occupied boxes can be denoted by the sequence (2, 2, 2, 1, 2), in which the number of consecutive occupied and empty boxes appear alternately.
Considera una riga infinita di scatole. Alcune di queste scatole contengono una palla. Per esempio, una configurazione iniziale di due scatole occupate consecutive seguite da due scatole vuote, due scatole piene, una scatola buota e due scatole piene può essere denotata dalla sequenza (2, 2, 2, 1, 2), in cui il numero di scatole piene e vuote appare alternato.
A turn consists of moving each ball exactly once according to the following rule: Transfer the leftmost ball which has not been moved to the nearest empty box to its right.
Un turno consiste nel muovere ogni palla esattamente una volta secondo la seguente regola: Trasferisci la palla più a sinistra che non è stata ancora mossa alla scatola vuota più vicina alla sua destra.
After one turn the sequence (2, 2, 2, 1, 2) becomes (2, 2, 1, 2, 3) as can be seen below; note that we begin the new sequence starting at the first occupied box.
Dopo un turno la sequenza (2, 2, 2, 1, 2) diventa (2, 2, 1, 2, 3) come può essere visto sotto; nota che iniziamo la nuova sequenza iniziando dalla prima scatola occupata.
A system like this is called a Box-Ball System or BBS for short.
<img class="img-responsive center-block" alt="animazione che mostra un turno completo da (2, 2, 2, 1, 2) a (2, 2, 1, 2, 3)" src="https://cdn.freecodecamp.org/curriculum/project-euler/box-ball-system-1.gif" style="background-color: white; padding: 10px;" />
It can be shown that after a sufficient number of turns, the system evolves to a state where the consecutive numbers of occupied boxes is invariant. In the example below, the consecutive numbers of occupied boxes evolves to \[1, 2, 3]; we shall call this the final state.
Un sistema come questo è chiamato Sistema Scatola-Palla o BBS (dall'inglese Box-Ball System) per brevità.
We define the sequence {ti}:s0 = 290797 sk+1 = sk2 mod 50515093 tk = (sk mod 64) + 1
Può essere mostrato che il sistema dopo un numero sufficiente di turni evolve ad uno stato dove i numeri di scatole occupate consecutivamente non cambiano. Nell'esempio sotto, i numeri di scatole occupate consecutivamente evolve a [1, 2, 3]; chiamiamo questo lo stato finale.
Starting from the initial configuration (t0, t1, …, t10), the final state becomes \[1, 3, 10, 24, 51, 75]. Starting from the initial configuration (t0, t1, …, t10 000 000), find the final state. Give as your answer the sum of the squares of the elements of the final state. For example, if the final state is \[1, 2, 3] then 14 ( = 12 + 22 + 32) is your answer.
<img class="img-responsive center-block" alt="quattro turni da scatore occupate [2, 2, 2] a stato finale [1, 2, 3]" src="https://cdn.freecodecamp.org/curriculum/project-euler/box-ball-system-2.gif" style="background-color: white; padding: 10px;" />
Definiamo la sequenza $\\{t_i\\}$:
$$\begin{align} & s_0 = 290\\,797 \\\\ & s_{k + 1} = {s_k}^2\bmod 50\\,515\\,093 \\\\ & t_k = (s_k\bmod 64) + 1 \end{align}$$
Iniziando dalla configurazione iniziale $(t_0, t_1, \ldots, t_{10})$, lo stato finale diventa [1, 3, 10, 24, 51, 75].
A partire dalla configurazione iniziale $(t_0, t_1, \ldots, t_{10\\,000\\,000})$, trova lo stato finale.
Dai come risposta la somma dei quadrati degli elementi dello stato finale. Per esempio, se lo stato finale è [1, 2, 3] allora $14 (= 1^2 + 2^2 + 3^2)$ è la tua risposta.
# --hints--
`euler426()` should return 31591886008.
`boxBallSystem()` dovrebbe restituire `31591886008`.
```js
assert.strictEqual(euler426(), 31591886008);
assert.strictEqual(boxBallSystem(), 31591886008);
```
# --seed--
@ -35,12 +45,12 @@ assert.strictEqual(euler426(), 31591886008);
## --seed-contents--
```js
function euler426() {
function boxBallSystem() {
return true;
}
euler426();
boxBallSystem();
```
# --solutions--