chore(i18n,curriculum): update translations (#43167)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5949b579404977fbaefcd736
|
||||
title: 9 billion names of God the integer
|
||||
title: I 9 miliardi di nomi di Dio
|
||||
challengeType: 5
|
||||
forumTopicId: 302219
|
||||
dashedName: 9-billion-names-of-god-the-integer
|
||||
@ -8,21 +8,21 @@ dashedName: 9-billion-names-of-god-the-integer
|
||||
|
||||
# --description--
|
||||
|
||||
This task is a variation of the [short story by Arthur C. Clarke](https://en.wikipedia.org/wiki/The Nine Billion Names of God#Plot_summary "wp: The Nine Billion Names of God#Plot_summary").
|
||||
Questa sfida è una variazione [della storia breve di Arthur C. Clarke](https://it.wikipedia.org/wiki/I_nove_miliardi_di_nomi_di_Dio).
|
||||
|
||||
(Solvers should be aware of the consequences of completing this task.)
|
||||
(I risolutori dovrebbero essere consapevoli delle consequenze di completare questa sfida)
|
||||
|
||||
In detail, to specify what is meant by a "name":
|
||||
In dettaglio, per specificare cosa si intende per "nome":
|
||||
|
||||
<ul>
|
||||
<li>The integer 1 has 1 name "1".</li>
|
||||
<li>The integer 2 has 2 names "1+1" and "2".</li>
|
||||
<li>The integer 3 has 3 names "1+1+1", "2+1", and "3".</li>
|
||||
<li>The integer 4 has 5 names "1+1+1+1", "2+1+1", "2+2", "3+1", "4".</li>
|
||||
<li>The integer 5 has 7 names "1+1+1+1+1", "2+1+1+1", "2+2+1", "3+1+1", "3+2", "4+1", "5".</li>
|
||||
<li>Il numero 1 ha 1 nome "1".</li>
|
||||
<li>Il numero 2 ha 2 nomi "1+1" e "2".</li>
|
||||
<li>Il numero 3 ha 3 nomi "1+1+1", "2+1", e "3".</li>
|
||||
<li>Il numero 4 ha 5 nomi "1+1+1+1", "2+1+1", "2+2", "3+1" e "4".</li>
|
||||
<li>Il numero 5 ha 7 nomi "1+1+1+1+1", "2+1+1+1", "2+2+1", "3+1+1", "3+2", "4+1", "5".</li>
|
||||
</ul>
|
||||
|
||||
This can be visualized in the following form:
|
||||
Questo può essere visualizzato nella seguente forma:
|
||||
|
||||
<pre> 1
|
||||
1 1
|
||||
@ -32,53 +32,53 @@ This can be visualized in the following form:
|
||||
1 3 3 2 1 1
|
||||
</pre>
|
||||
|
||||
Where row $n$ corresponds to integer $n$, and each column $C$ in row $m$ from left to right corresponds to the number of names beginning with $C$.
|
||||
Dove la riga $n$ corrisponde al numero $n$, e ogni colonna $C$ nella riga $m$ da sinistra a destra corrisponde al numero di nomi che inizia con $C$.
|
||||
|
||||
Optionally note that the sum of the $n$-th row $P(n)$ is the integer partition function.
|
||||
Facoltativamente, nota che la somma dell'$n$-sima riga $P(n)$ è la funzione di partizione dei numeri interi.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Implement a function that returns the sum of the $n$-th row.
|
||||
Implementa una funzione che restituisca la somma della $n$-sima riga.
|
||||
|
||||
# --hints--
|
||||
|
||||
`numberOfNames` should be function.
|
||||
`numberOfNames` dovrebbe essere una funzione.
|
||||
|
||||
```js
|
||||
assert(typeof numberOfNames === 'function');
|
||||
```
|
||||
|
||||
`numberOfNames(5)` should equal 7.
|
||||
`numberOfNames(5)` dovrebbe essere uguale a 7.
|
||||
|
||||
```js
|
||||
assert.equal(numberOfNames(5), 7);
|
||||
```
|
||||
|
||||
`numberOfNames(12)` should equal 77.
|
||||
`numberOfNames(12)` dovrebbe essere uguale a 77.
|
||||
|
||||
```js
|
||||
assert.equal(numberOfNames(12), 77);
|
||||
```
|
||||
|
||||
`numberOfNames(18)` should equal 385.
|
||||
`numberOfNames(18)` dovrebbe essere uguale a 385.
|
||||
|
||||
```js
|
||||
assert.equal(numberOfNames(18), 385);
|
||||
```
|
||||
|
||||
`numberOfNames(23)` should equal 1255.
|
||||
`numberOfNames(23)` dovrebbe essere uguale a 1255.
|
||||
|
||||
```js
|
||||
assert.equal(numberOfNames(23), 1255);
|
||||
```
|
||||
|
||||
`numberOfNames(42)` should equal 53174.
|
||||
`numberOfNames(42)` dovrebbe essere uguale a 53174.
|
||||
|
||||
```js
|
||||
assert.equal(numberOfNames(42), 53174);
|
||||
```
|
||||
|
||||
`numberOfNames(123)` should equal 2552338241.
|
||||
`numberOfNames(123)` dovrebbe essere uguale a 2552338241.
|
||||
|
||||
```js
|
||||
assert.equal(numberOfNames(123), 2552338241);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 594810f028c0303b75339acc
|
||||
title: ABC Problem
|
||||
title: Problema ABC
|
||||
challengeType: 5
|
||||
forumTopicId: 302220
|
||||
dashedName: abc-problem
|
||||
@ -8,7 +8,7 @@ dashedName: abc-problem
|
||||
|
||||
# --description--
|
||||
|
||||
You are given a collection of ABC blocks (e.g., childhood alphabet blocks). There are 20 blocks with two letters on each block. A complete alphabet is guaranteed amongst all sides of the blocks. The sample collection of blocks:
|
||||
Ti viene data una collezione di blocchi ABC (tipo i cubi con le lettere per i bambini). Ci sono 20 blocchi con due lettere su ogni blocco. Considerando tutti i lati dei blocchi è garantito un alfabeto completo. Ecco un esempio di una collezione di blocchi:
|
||||
|
||||
<pre>(B O)
|
||||
(X K)
|
||||
@ -34,60 +34,60 @@ You are given a collection of ABC blocks (e.g., childhood alphabet blocks). Ther
|
||||
|
||||
# --instructions--
|
||||
|
||||
Implement a function that takes a string (word) and determines whether the word can be spelled with the given collection of blocks.
|
||||
Implementa una funzione che prende una stringa (parola) e determina se la parola può essere scritta con la collezione di blocchi data.
|
||||
|
||||
Some rules to keep in mind:
|
||||
Alcune regole da tenere a mente:
|
||||
|
||||
<ul>
|
||||
<li>Once a letter on a block is used, that block cannot be used again.</li>
|
||||
<li>The function should be case-insensitive.</li>
|
||||
<li>Una volta che viene utilizzata una lettera su un blocco, quel blocco non può essere usato di nuovo.</li>
|
||||
<li>La funzione non deve fare distinzione tra maiuscole e minuscole.</li>
|
||||
</ul>
|
||||
|
||||
# --hints--
|
||||
|
||||
`canMakeWord` should be a function.
|
||||
`canMakeWord` dovrebbe essere una funzione.
|
||||
|
||||
```js
|
||||
assert(typeof canMakeWord === 'function');
|
||||
```
|
||||
|
||||
`canMakeWord` should return a boolean.
|
||||
`canMakeWord` dovrebbe restituire un valore booleano.
|
||||
|
||||
```js
|
||||
assert(typeof canMakeWord('hi') === 'boolean');
|
||||
```
|
||||
|
||||
`canMakeWord("bark")` should return true.
|
||||
`canMakeWord("bark")` dovrebbe restituire true.
|
||||
|
||||
```js
|
||||
assert(canMakeWord(words[0]));
|
||||
```
|
||||
|
||||
`canMakeWord("BooK")` should return false.
|
||||
`canMakeWord("BooK")` dovrebbe restituire false.
|
||||
|
||||
```js
|
||||
assert(!canMakeWord(words[1]));
|
||||
```
|
||||
|
||||
`canMakeWord("TReAT")` should return true.
|
||||
`canMakeWord("TReAT")` dovrebbe restituire true.
|
||||
|
||||
```js
|
||||
assert(canMakeWord(words[2]));
|
||||
```
|
||||
|
||||
`canMakeWord("COMMON")` should return false.
|
||||
`canMakeWord("COMMON")` dovrebbe restituire false.
|
||||
|
||||
```js
|
||||
assert(!canMakeWord(words[3]));
|
||||
```
|
||||
|
||||
`canMakeWord("squAD")` should return true.
|
||||
`canMakeWord("squAD")` dovrebbe restituire true.
|
||||
|
||||
```js
|
||||
assert(canMakeWord(words[4]));
|
||||
```
|
||||
|
||||
`canMakeWord("conFUSE")` should return true.
|
||||
`canMakeWord("conFUSE")` dovrebbe restituire false.
|
||||
|
||||
```js
|
||||
assert(canMakeWord(words[5]));
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 594810f028c0303b75339acd
|
||||
title: 'Abundant, deficient and perfect number classifications'
|
||||
title: 'Classificazione dei numeri abbondanti, carenti e perfetti'
|
||||
challengeType: 5
|
||||
forumTopicId: 302221
|
||||
dashedName: abundant-deficient-and-perfect-number-classifications
|
||||
@ -8,55 +8,55 @@ dashedName: abundant-deficient-and-perfect-number-classifications
|
||||
|
||||
# --description--
|
||||
|
||||
These define three classifications of positive integers based on their proper divisors.
|
||||
Queste definiscono tre classificazioni di numeri interi positivi basate sui loro divisori.
|
||||
|
||||
Let $P(n)$ be the sum of the proper divisors of `n` where proper divisors are all positive integers `n` other than `n` itself.
|
||||
Sia $P(n)$ la somma dei divisori di `n` dove i divisori sono tutti interi positivi `n` diversi da `n` stesso.
|
||||
|
||||
If `P(n) < n` then `n` is classed as `deficient`
|
||||
Se `P(n) < n` allora `n` è classificato come `deficient`
|
||||
|
||||
If `P(n) === n` then `n` is classed as `perfect`
|
||||
Se `P(n) === n` allora `n` è classificato come `perfect`
|
||||
|
||||
If `P(n) > n` then `n` is classed as `abundant`
|
||||
Se `P(n) > n` allora `n` è classificato come `abundant`
|
||||
|
||||
**Example**: `6` has proper divisors of `1`, `2`, and `3`. `1 + 2 + 3 = 6`, so `6` is classed as a perfect number.
|
||||
**Esempio**: `6` ha i divisori `1`, `2` e `3`. `1 + 2 + 3 = 6`, quindi `6` è classificato come numero perfetto.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Implement a function that calculates how many of the integers from `1` to `num` (inclusive) are in each of the three classes. Output the result as an array in the following format `[deficient, perfect, abundant]`.
|
||||
Implementa una funzione che calcola quanti numeri interi tra `1` e `num` (inclusi) sono in queste tre categorie. Restituisci il risultato come un array nel seguente formato `[deficient, perfect, abundant]`.
|
||||
|
||||
# --hints--
|
||||
|
||||
`getDPA` should be a function.
|
||||
`getDPA` dovrebbe essere una funzione.
|
||||
|
||||
```js
|
||||
assert(typeof getDPA === 'function');
|
||||
```
|
||||
|
||||
`getDPA(5000)` should return an array.
|
||||
`getDPA(5000)` dovrebbe restituire un array.
|
||||
|
||||
```js
|
||||
assert(Array.isArray(getDPA(5000)));
|
||||
```
|
||||
|
||||
`getDPA(5000)` return array should have a length of `3`.
|
||||
`getDPA(5000)` dovrebbe restituire un array di lunghezza `3`.
|
||||
|
||||
```js
|
||||
assert(getDPA(5000).length === 3);
|
||||
```
|
||||
|
||||
`getDPA(5000)` should return `[3758, 3, 1239]`.
|
||||
`getDPA(5000)` dovrebbe restituire `[3758, 3, 1239]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(getDPA(5000), [3758, 3, 1239]);
|
||||
```
|
||||
|
||||
`getDPA(10000)` should return `[7508, 4, 2488]`.
|
||||
`getDPA(10000)` dovrebbe restituire `[7508, 4, 2488]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(getDPA(10000), [7508, 4, 2488]);
|
||||
```
|
||||
|
||||
`getDPA(20000)` should return `[15043, 4, 4953]`.
|
||||
`getDPA(20000)` dovrebbe restituire `[15043, 4, 4953]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(getDPA(20000), [15043, 4, 4953]);
|
||||
|
Reference in New Issue
Block a user