chore(i18n,curriculum): update translations (#43104)
This commit is contained in:
@ -38,6 +38,12 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
`zeroArray(4,3)` dovrebbe restituire un array contenente 4 righe di 3 colonne di zeri ciascuna.
|
||||
|
||||
```js
|
||||
assert(JSON.stringify(zeroArray(4,3)) == '[[0,0,0],[0,0,0],[0,0,0],[0,0,0]]');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
@ -62,6 +68,7 @@ function zeroArray(m, n) {
|
||||
|
||||
let matrix = zeroArray(3, 2);
|
||||
console.log(matrix);
|
||||
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
@ -86,4 +93,5 @@ function zeroArray(m, n) {
|
||||
|
||||
let matrix = zeroArray(3, 2);
|
||||
console.log(matrix);
|
||||
|
||||
```
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7790367417b2b2512aaf
|
||||
title: Faça com que os links fiquem navegáveis com chaves de acesso HTML
|
||||
title: Fazer com que os links fiquem navegáveis com chaves de acesso HTML
|
||||
challengeType: 0
|
||||
videoUrl: 'https://scrimba.com/c/cQvmaTp'
|
||||
forumTopicId: 301021
|
||||
|
@ -19,7 +19,7 @@ Um exemplo que criaria um grid de 100 linhas, cada linha com 50px de altura:
|
||||
grid-template-rows: repeat(100, 50px);
|
||||
```
|
||||
|
||||
Você pode declarar mias de um tamanho ao usar a função de repetição e também usá-la em conjunto de outros tamanhos quando estiver criando a estrutura de um grid. Exemplo:
|
||||
Você também pode repetir vários valores com a função repeat e inserir a função entre outros valores ao definir a estrutura de um grid. Exemplo:
|
||||
|
||||
```css
|
||||
grid-template-columns: repeat(2, 1fr 50px) 20px;
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d78af367417b2b2512b03
|
||||
title: Crie um formulário de pesquisa
|
||||
title: Criar um formulário de pesquisa
|
||||
challengeType: 3
|
||||
forumTopicId: 301145
|
||||
dashedName: build-a-survey-form
|
||||
|
@ -9,7 +9,7 @@ dashedName: create-decimal-numbers-with-javascript
|
||||
|
||||
# --description--
|
||||
|
||||
Nós também podemos armazenar números decimais em variáveis. Números decimais são às vezes referidos como <dfn>números do ponto flutuante</dfn> ou <dfn>floats</dfn>.
|
||||
Nós também podemos armazenar números decimais em variáveis. Números decimais são às vezes referidos como números de <dfn>ponto flutuante</dfn> ou <dfn>floats</dfn>.
|
||||
|
||||
**Observação:** nem todos os números reais podem ser representados com precisão no <dfn>ponto flutuante</dfn>. Isso pode levar a erros de arredondamento. [Detalhes aqui](https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems).
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5664820f61c48e80c9fa476c
|
||||
title: Golfe de código
|
||||
title: Jogar golfe de código
|
||||
challengeType: 1
|
||||
videoUrl: 'https://scrimba.com/c/c9ykNUR'
|
||||
forumTopicId: 18195
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7b7e367417b2b2512b24
|
||||
title: Use o operador condicional (ternário)
|
||||
title: Usar o operador condicional (ternário)
|
||||
challengeType: 1
|
||||
forumTopicId: 301181
|
||||
dashedName: use-the-conditional-ternary-operator
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 56533eb9ac21ba0edf2244bb
|
||||
title: Palavras em branco
|
||||
title: Preencher espaços em branco
|
||||
challengeType: 1
|
||||
videoUrl: 'https://scrimba.com/c/caqn8zuP'
|
||||
forumTopicId: 18377
|
||||
|
@ -38,6 +38,12 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
`zeroArray(4,3)` deve retornar um array com 4 linhas de 3 colunas de zeros cada.
|
||||
|
||||
```js
|
||||
assert(JSON.stringify(zeroArray(4,3)) == '[[0,0,0],[0,0,0],[0,0,0],[0,0,0]]');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
@ -62,6 +68,7 @@ function zeroArray(m, n) {
|
||||
|
||||
let matrix = zeroArray(3, 2);
|
||||
console.log(matrix);
|
||||
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
@ -86,4 +93,5 @@ function zeroArray(m, n) {
|
||||
|
||||
let matrix = zeroArray(3, 2);
|
||||
console.log(matrix);
|
||||
|
||||
```
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7b88367417b2b2512b47
|
||||
title: Use o parâmetro rest com parâmetros de função
|
||||
title: Usar o parâmetro rest com parâmetros de função
|
||||
challengeType: 1
|
||||
forumTopicId: 301221
|
||||
dashedName: use-the-rest-parameter-with-function-parameters
|
||||
|
@ -12,7 +12,7 @@ Crie uma função que some dois argumentos juntos. Se apenas um argumento for fo
|
||||
|
||||
Por exemplo, `addTogether(2, 3)` deve retornar `5` e `addTogether(2)` deve retornar uma função.
|
||||
|
||||
Chamando essa função retornada com um argumento retornará a soma:
|
||||
Chamar essa função retornada com um argumento retornará a soma:
|
||||
|
||||
```js
|
||||
var sumTwoAnd = addTogether(2);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7db2367417b2b2512b89
|
||||
title: Utilizar mixin para adicionar comportamentos comuns entre objetos não relacionados
|
||||
title: Usar um mixin para adicionar comportamentos comuns entre objetos não relacionados
|
||||
challengeType: 1
|
||||
forumTopicId: 301331
|
||||
dashedName: use-a-mixin-to-add-common-behavior-between-unrelated-objects
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7dba367417b2b2512ba9
|
||||
title: Lookaheads positivos e negativos
|
||||
title: Usar lookaheads positivos e negativos
|
||||
challengeType: 1
|
||||
forumTopicId: 301360
|
||||
dashedName: positive-and-negative-lookahead
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: bad87fee1348bd9aedc08845
|
||||
title: Adicione ícones de Font Awesome para todos os botões
|
||||
title: Adicionar ícones de Font Awesome para todos os botões
|
||||
challengeType: 0
|
||||
forumTopicId: 16637
|
||||
required:
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: bad87fee1348bd9aedb08845
|
||||
title: Botões de opção de estilo responsivo
|
||||
title: Criar botões de opção de estilo responsivo
|
||||
challengeType: 0
|
||||
forumTopicId: 18270
|
||||
required:
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7dbc367417b2b2512bae
|
||||
title: Crie uma bateria eletrônica
|
||||
title: Criar uma bateria eletrônica
|
||||
challengeType: 3
|
||||
forumTopicId: 301370
|
||||
dashedName: build-a-drum-machine
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5a24c314108439a4d403618a
|
||||
title: Use array.map() para renderizar elementos dinamicamente
|
||||
title: Usar array.map() para renderizar elementos dinamicamente
|
||||
challengeType: 6
|
||||
forumTopicId: 301417
|
||||
dashedName: use-array-map-to-dynamically-render-elements
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5a24c314108439a4d4036150
|
||||
title: Manipule uma ação na store
|
||||
title: Manipular uma ação na store
|
||||
challengeType: 6
|
||||
forumTopicId: 301444
|
||||
dashedName: handle-an-action-in-the-store
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5a24c314108439a4d4036158
|
||||
title: Nunca alterar o state
|
||||
title: Manter o state inalterado
|
||||
challengeType: 6
|
||||
forumTopicId: 301445
|
||||
dashedName: never-mutate-state
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5a24c314108439a4d4036157
|
||||
title: Escreva um contador com Redux
|
||||
title: Escrever um contador com Redux
|
||||
challengeType: 6
|
||||
forumTopicId: 301453
|
||||
dashedName: write-a-counter-with-redux
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7dbf367417b2b2512bba
|
||||
title: Use @each para mapear sobre itens em uma lista
|
||||
title: Usar @each para mapear sobre itens em uma lista
|
||||
challengeType: 0
|
||||
forumTopicId: 301461
|
||||
dashedName: use-each-to-map-over-items-in-a-list
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7dbe367417b2b2512bb9
|
||||
title: Use @for para criar um laço em Sass
|
||||
title: Usar @for para criar um laço em Sass
|
||||
challengeType: 0
|
||||
forumTopicId: 301462
|
||||
dashedName: use-for-to-create-a-sass-loop
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7dbe367417b2b2512bb8
|
||||
title: Use @if e @else para adicionar lógica a seus estilos
|
||||
title: Usar @if e @else para adicionar lógica a seus estilos
|
||||
challengeType: 0
|
||||
forumTopicId: 301463
|
||||
dashedName: use-if-and-else-to-add-logic-to-your-styles
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: bd7168d8c242eddfaeb5bd13
|
||||
title: Visualize dados com um gráfico de barras
|
||||
title: Visualizar dados com um gráfico de barras
|
||||
challengeType: 3
|
||||
forumTopicId: 301464
|
||||
dashedName: visualize-data-with-a-bar-chart
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7fb1367417b2b2512bf4
|
||||
title: Encadeie middleware para criar um servidor de tempo
|
||||
title: Encadear middleware para criar um servidor de tempo
|
||||
challengeType: 2
|
||||
forumTopicId: 301510
|
||||
dashedName: chain-middleware-to-create-a-time-server
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7fb2367417b2b2512bf8
|
||||
title: Retorne dados de requisições POST
|
||||
title: Obter dados de solicitações de POST
|
||||
challengeType: 2
|
||||
forumTopicId: 301511
|
||||
dashedName: get-data-from-post-requests
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7fb8367417b2b2512c10
|
||||
title: Exclua um documento usando model.findByIdAndRemove
|
||||
title: Excluir um documento usando model.findByIdAndRemove
|
||||
challengeType: 2
|
||||
forumTopicId: 301539
|
||||
dashedName: delete-one-document-using-model-findbyidandremove
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7fb7367417b2b2512c0b
|
||||
title: Use model.find() para procurar no seu banco de dados
|
||||
title: Usar model.find() para procurar no seu banco de dados
|
||||
challengeType: 2
|
||||
forumTopicId: 301543
|
||||
dashedName: use-model-find-to-search-your-database
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7fb7367417b2b2512c0d
|
||||
title: Use model.findById() para procurar no seu banco de dados por _id
|
||||
title: Usar model.findById() para procurar no seu banco de dados por _id
|
||||
challengeType: 2
|
||||
forumTopicId: 301544
|
||||
dashedName: use-model-findbyid-to-search-your-database-by-id
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5895f70df9fc0f352b528e68
|
||||
title: Estratégias de autenticação
|
||||
title: Usar estratégias de autenticação
|
||||
challengeType: 2
|
||||
forumTopicId: 301547
|
||||
dashedName: authentication-strategies
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 589fc831f9fc0f352b528e77
|
||||
title: Autenticação com Socket.IO
|
||||
title: Autenticar com o Socket.IO
|
||||
challengeType: 2
|
||||
forumTopicId: 301548
|
||||
dashedName: authentication-with-socket-io
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 58966a17f9fc0f352b528e6d
|
||||
title: Registro de novos usuários
|
||||
title: Registrar novos usuários
|
||||
challengeType: 2
|
||||
forumTopicId: 301561
|
||||
dashedName: registration-of-new-users
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5895f70cf9fc0f352b528e66
|
||||
title: Serialização de um objeto de usuário
|
||||
title: Serializar um objeto de usuário
|
||||
challengeType: 2
|
||||
forumTopicId: 301563
|
||||
dashedName: serialization-of-a-user-object
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 589fc830f9fc0f352b528e74
|
||||
title: Configure o ambiente
|
||||
title: Configurar o ambiente
|
||||
challengeType: 2
|
||||
forumTopicId: 301566
|
||||
dashedName: set-up-the-environment
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37a1000cf542c50fe8c
|
||||
title: 'Problem 13: Large sum'
|
||||
title: 'Problema 13: Soma grande'
|
||||
challengeType: 5
|
||||
forumTopicId: 301757
|
||||
dashedName: problem-13-large-sum
|
||||
@ -8,7 +8,7 @@ dashedName: problem-13-large-sum
|
||||
|
||||
# --description--
|
||||
|
||||
Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.
|
||||
Abaixo está um número de 150 dígitos. Após somar este número, retorne os 10 primeiros dígitos.
|
||||
|
||||
<div style='padding-left: 4em;'>
|
||||
37107287533902102798797998220837590246510135740250<br>
|
||||
@ -115,19 +115,19 @@ Work out the first ten digits of the sum of the following one-hundred 50-digit n
|
||||
|
||||
# --hints--
|
||||
|
||||
`largeSum(testNums)` should return a number.
|
||||
`largeSum(testNums)` deve retornar um número.
|
||||
|
||||
```js
|
||||
assert(typeof largeSum(testNums) === 'number');
|
||||
```
|
||||
|
||||
`largeSum(testNums)` should return 8348422521.
|
||||
`largeSum(testNums)` deve retornar 8348422521.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largeSum(testNums), 8348422521);
|
||||
```
|
||||
|
||||
`largeSum(fiftyDigitNums)` should return 5537376230.
|
||||
`largeSum(fiftyDigitNums)` deve retornar 5537376230.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largeSum(fiftyDigitNums), 5537376230);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37a1000cf542c50fe8d
|
||||
title: 'Problem 14: Longest Collatz sequence'
|
||||
title: 'Problema 14: Maior conjectura de Collatz'
|
||||
challengeType: 5
|
||||
forumTopicId: 301768
|
||||
dashedName: problem-14-longest-collatz-sequence
|
||||
@ -8,61 +8,61 @@ dashedName: problem-14-longest-collatz-sequence
|
||||
|
||||
# --description--
|
||||
|
||||
The following iterative sequence is defined for the set of positive integers:
|
||||
A seguinte sequência iterativa é definida para o conjunto dos números inteiros positivos:
|
||||
|
||||
<div style='padding-left: 4em;'><var>n</var> → <var>n</var>/2 (<var>n</var> is even)</div>
|
||||
<div style='padding-left: 4em;'><var>n</var> → <var>n</var>/2 (use quando <var>n</var> for par)</div>
|
||||
|
||||
<div style='padding-left: 4em;'><var>n</var> → 3<var>n</var> + 1 (<var>n</var> is odd)</div>
|
||||
<div style='padding-left: 4em;'><var>n</var> → 3<var>n</var> + 1 (use quando <var>n</var> for ímpar)</div>
|
||||
|
||||
Using the rule above and starting with 13, we generate the following sequence:
|
||||
Usando a regra acima e começando com 13, geramos a seguinte sequência:
|
||||
|
||||
<div style='text-align: center;'>13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1</div>
|
||||
|
||||
It can be seen that this sequence (starting at 13 and finishing at 1) contains 10 terms. Although it has not been proved yet (Collatz Problem), it is thought that all starting numbers finish at 1.
|
||||
Podemos ver que essa sequência (começando em 13 e terminando em 1) contém 10 termos. Embora ainda não tenha sido provado (conjectura de Collatz), acredita-se que qualquer número inicial termine em 1.
|
||||
|
||||
Which starting number, under the given `limit`, produces the longest chain?
|
||||
Qual número inicial, sob o `limit` (limite) definido, produz a sequência mais longa?
|
||||
|
||||
**Note:** Once the chain starts the terms are allowed to go above one million.
|
||||
**Observação:** uma vez iniciada, os termos na sequência podem passar de um milhão.
|
||||
|
||||
# --hints--
|
||||
|
||||
`longestCollatzSequence(14)` should return a number.
|
||||
`longestCollatzSequence(14)` deve retornar um número.
|
||||
|
||||
```js
|
||||
assert(typeof longestCollatzSequence(14) === 'number');
|
||||
```
|
||||
|
||||
`longestCollatzSequence(14)` should return 9.
|
||||
`longestCollatzSequence(14)` deve retornar 9.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(14), 9);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(5847)` should return 3711.
|
||||
`longestCollatzSequence(5847)` deve retornar 3711.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(5847), 3711);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(46500)` should return 35655.
|
||||
`longestCollatzSequence(46500)` deve retornar 35655.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(46500), 35655);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(54512)` should return 52527.
|
||||
`longestCollatzSequence(54512)` deve retornar 52527.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(54512), 52527);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(100000)` should return 77031.
|
||||
`longestCollatzSequence(100000)` deve retornar 77031.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(100000), 77031);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(1000000)` should return 837799.
|
||||
`longestCollatzSequence(1000000)` deve retornar 837799.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(1000000), 837799);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37b1000cf542c50fe8e
|
||||
title: 'Problem 15: Lattice paths'
|
||||
title: 'Problema 15: Caminhos em uma grade'
|
||||
challengeType: 5
|
||||
forumTopicId: 301780
|
||||
dashedName: problem-15-lattice-paths
|
||||
@ -8,33 +8,33 @@ dashedName: problem-15-lattice-paths
|
||||
|
||||
# --description--
|
||||
|
||||
Starting in the top left corner of a 2×2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.
|
||||
Começando no canto superior esquerdo de uma grade 2×2, e sendo capaz de se mover para a direita e para baixo, existem exatamente 6 caminhos até o canto inferior direito.
|
||||
|
||||
<img class="img-responsive center-block" alt="a diagram of 6 2 by 2 grids showing all the routes to the bottom right corner" src="https://cdn-media-1.freecodecamp.org/project-euler/1Atixoj.gif" style="background-color: white; padding: 10px;" />
|
||||
<img class="img-responsive center-block" alt="um diagrama de 6 grades de 2x2 mostrando todas as rotas para o canto inferior direito" src="https://cdn-media-1.freecodecamp.org/project-euler/1Atixoj.gif" style="background-color: white; padding: 10px;" />
|
||||
|
||||
How many such routes are there through a given `gridSize`?
|
||||
Quantas rotas existem no parâmetro `gridSize` fornecido à sua função?
|
||||
|
||||
# --hints--
|
||||
|
||||
`latticePaths(4)` should return a number.
|
||||
`latticePaths(4)` deve retornar um número.
|
||||
|
||||
```js
|
||||
assert(typeof latticePaths(4) === 'number');
|
||||
```
|
||||
|
||||
`latticePaths(4)` should return 70.
|
||||
`latticePaths(4)` deve retornar 70.
|
||||
|
||||
```js
|
||||
assert.strictEqual(latticePaths(4), 70);
|
||||
```
|
||||
|
||||
`latticePaths(9)` should return 48620.
|
||||
`latticePaths(9)` deve retornar 48620.
|
||||
|
||||
```js
|
||||
assert.strictEqual(latticePaths(9), 48620);
|
||||
```
|
||||
|
||||
`latticePaths(20)` should return 137846528820.
|
||||
`latticePaths(20)` deve retornar 137846528820.
|
||||
|
||||
```js
|
||||
assert.strictEqual(latticePaths(20), 137846528820);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37d1000cf542c50fe8f
|
||||
title: 'Problem 16: Power digit sum'
|
||||
title: 'Problema 16: Soma dos algarismos de uma potenciação'
|
||||
challengeType: 5
|
||||
forumTopicId: 301791
|
||||
dashedName: problem-16-power-digit-sum
|
||||
@ -8,31 +8,31 @@ dashedName: problem-16-power-digit-sum
|
||||
|
||||
# --description--
|
||||
|
||||
2<sup>15</sup> = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
|
||||
2<sup>15</sup> = 32768. A soma destes algarismos é 3 + 2 + 7 + 6 + 8 = 26.
|
||||
|
||||
What is the sum of the digits of the number 2<sup><code>exponent</code></sup>?
|
||||
Qual é a soma dos algarismos do número 2<sup><code>exponent</code></sup>?
|
||||
|
||||
# --hints--
|
||||
|
||||
`powerDigitSum(15)` should return a number.
|
||||
`powerDigitSum(15)` deve retornar um número.
|
||||
|
||||
```js
|
||||
assert(typeof powerDigitSum(15) === 'number');
|
||||
```
|
||||
|
||||
`powerDigitSum(15)` should return 26.
|
||||
`powerDigitSum(15)` deve retornar 26.
|
||||
|
||||
```js
|
||||
assert.strictEqual(powerDigitSum(15), 26);
|
||||
```
|
||||
|
||||
`powerDigitSum(128)` should return 166.
|
||||
`powerDigitSum(128)` deve retornar 166.
|
||||
|
||||
```js
|
||||
assert.strictEqual(powerDigitSum(128), 166);
|
||||
```
|
||||
|
||||
`powerDigitSum(1000)` should return 1366.
|
||||
`powerDigitSum(1000)` deve retornar 1366.
|
||||
|
||||
```js
|
||||
assert.strictEqual(powerDigitSum(1000), 1366);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37d1000cf542c50fe90
|
||||
title: 'Problem 17: Number letter counts'
|
||||
title: 'Problema 17: Contador de letras'
|
||||
challengeType: 5
|
||||
forumTopicId: 301804
|
||||
dashedName: problem-17-number-letter-counts
|
||||
@ -8,33 +8,33 @@ dashedName: problem-17-number-letter-counts
|
||||
|
||||
# --description--
|
||||
|
||||
If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total.
|
||||
Considere os números de 1 a 5 escritos em palavras: um, dois, três, quatro, cinco. Se você somar a quantidade de letras, terá 2 + 4 + 4 + 6 + 5 = 21.
|
||||
|
||||
If all the numbers from 1 to given `limit` inclusive were written out in words, how many letters would be used?
|
||||
Se todos os números entre 1 e o parâmetro `limit` (inclusivo) fossem escritos em palavras, quantas letras existiriam?
|
||||
|
||||
**Note:** Do not count spaces or hyphens. For example, 342 (three hundred and forty-two) contains 23 letters and 115 (one hundred and fifteen) contains 20 letters. The use of "and" when writing out numbers is in compliance with British usage.
|
||||
**Observação:** não conte espaços ou hífens. Por exemplo, 342 (trezentos e quarenta e dois) contém 23 letras e 115 (cento e quinze) contém 12 letras. O uso de "e" ao escrever números está em conformidade com a utilização britânica. Lembre-se que o teste considera apenas números escritos em Inglês.
|
||||
|
||||
# --hints--
|
||||
|
||||
`numberLetterCounts(5)` should return a number.
|
||||
`numberLetterCounts(5)` deve retornar um número.
|
||||
|
||||
```js
|
||||
assert(typeof numberLetterCounts(5) === 'number');
|
||||
```
|
||||
|
||||
`numberLetterCounts(5)` should return 19.
|
||||
`numberLetterCounts(5)` deve retornar 19.
|
||||
|
||||
```js
|
||||
assert.strictEqual(numberLetterCounts(5), 19);
|
||||
```
|
||||
|
||||
`numberLetterCounts(150)` should return 1903.
|
||||
`numberLetterCounts(150)` deve retornar 1903.
|
||||
|
||||
```js
|
||||
assert.strictEqual(numberLetterCounts(150), 1903);
|
||||
```
|
||||
|
||||
`numberLetterCounts(1000)` should return 21124.
|
||||
`numberLetterCounts(1000)` deve retornar 21124.
|
||||
|
||||
```js
|
||||
assert.strictEqual(numberLetterCounts(1000), 21124);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37e1000cf542c50fe91
|
||||
title: 'Problem 18: Maximum path sum I'
|
||||
title: 'Problema 18: Soma do caminho I'
|
||||
challengeType: 5
|
||||
forumTopicId: 301815
|
||||
dashedName: problem-18-maximum-path-sum-i
|
||||
@ -8,7 +8,7 @@ dashedName: problem-18-maximum-path-sum-i
|
||||
|
||||
# --description--
|
||||
|
||||
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23.
|
||||
Começando no topo do triângulo abaixo e movendo-se para os números adjacentes na linha abaixo, o total máximo de cima para baixo é 23.
|
||||
|
||||
<span style='display: block; text-align: center;'>
|
||||
<strong style='color: red;'>3</strong><br>
|
||||
@ -17,9 +17,9 @@ By starting at the top of the triangle below and moving to adjacent numbers on t
|
||||
8 5 <strong style='color: red;'>9</strong> 3
|
||||
</span>
|
||||
|
||||
That is, 3 + 7 + 4 + 9 = 23.
|
||||
Ou seja, 3 + 7 + 4 + 9 = 23.
|
||||
|
||||
Find the maximum total from top to bottom of the triangle below:
|
||||
Calcule o máximo total do topo até o final do triângulo abaixo:
|
||||
|
||||
75
|
||||
95 64
|
||||
@ -37,23 +37,23 @@ Find the maximum total from top to bottom of the triangle below:
|
||||
63 66 04 68 89 53 67 30 73 16 69 87 40 31
|
||||
04 62 98 27 23 09 70 98 73 93 38 53 60 04 23
|
||||
|
||||
**NOTE:** As there are only 16384 routes, it is possible to solve this problem by trying every route. However, Problem 67, is the same challenge with a triangle containing one-hundred rows; it cannot be solved by brute force, and requires a clever method! ;o)
|
||||
**Observação:** como existem apenas 16384 rotas, é possível resolver este problema tentando cada rota. No entanto, o problema 67 (que você irá ver futuramente) aborda este mesmo desafio, com a diferença que o triângulo contém cem linhas. Por tanto, não pode ser resolvido pela força bruta e requer um método inteligente! ;)
|
||||
|
||||
# --hints--
|
||||
|
||||
`maximumPathSumI(testTriangle)` should return a number.
|
||||
`maximumPathSumI(testTriangle)` deve retornar um número.
|
||||
|
||||
```js
|
||||
assert(typeof maximumPathSumI(testTriangle) === 'number');
|
||||
```
|
||||
|
||||
`maximumPathSumI(testTriangle)` should return 23.
|
||||
`maximumPathSumI(testTriangle)` deve retornar 23.
|
||||
|
||||
```js
|
||||
assert.strictEqual(maximumPathSumI(testTriangle), 23);
|
||||
```
|
||||
|
||||
`maximumPathSumI(numTriangle)` should return 1074.
|
||||
`maximumPathSumI(numTriangle)` deve retornar 1074.
|
||||
|
||||
```js
|
||||
assert.strictEqual(maximumPathSumI(numTriangle), 1074);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37f1000cf542c50fe92
|
||||
title: 'Problem 19: Counting Sundays'
|
||||
title: 'Problema 19: Contando domingos'
|
||||
challengeType: 5
|
||||
forumTopicId: 301827
|
||||
dashedName: problem-19-counting-sundays
|
||||
@ -8,37 +8,37 @@ dashedName: problem-19-counting-sundays
|
||||
|
||||
# --description--
|
||||
|
||||
You are given the following information, but you may prefer to do some research for yourself.
|
||||
Você recebeu as seguintes informações, mas se preferir, pode pesquisar por si mesmo.
|
||||
|
||||
<ul>
|
||||
<li>1 Jan 1900 was a Monday.</li>
|
||||
<li>Thirty days has September,<br>April, June and November.<br>All the rest have thirty-one,<br>Saving February alone,<br>Which has twenty-eight, rain or shine.<br>And on leap years, twenty-nine.</li>
|
||||
<li>A leap year occurs on any year evenly divisible by 4, but not on a century unless it is divisible by 400.</li>
|
||||
<li>1 de janeiro de 1900 foi uma segunda-feira.</li>
|
||||
<li>Setembro, abril, junho e<br>novembro têm trinta dias.<br>Os outros meses têm trinta e um,<br>exceto fevereiro,<br> que tem vinte e oito, faça chuva ou faça sol.<br>E nos anos bissextos, vinte e nove apenas.</li>
|
||||
<li>Um ano bissexto é aquele que, dividido por 4, não deixa resto. Se o ano for secular, apenas aqueles divisíveis por 400 são bissextos.</li>
|
||||
</ul>
|
||||
|
||||
How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)?
|
||||
Quantos domingos caíram no primeiro dia do mês durante o século 20 (1 de janeiro de 1901 a 31 de dezembro de 2000)?
|
||||
|
||||
# --hints--
|
||||
|
||||
`countingSundays(1943, 1946)` should return a number.
|
||||
`countingSundays(1943, 1946)` deve retornar um número.
|
||||
|
||||
```js
|
||||
assert(typeof countingSundays(1943, 1946) === 'number');
|
||||
```
|
||||
|
||||
`countingSundays(1943, 1946)` should return 6.
|
||||
`countingSundays(1943, 1946)` deve retornar 6.
|
||||
|
||||
```js
|
||||
assert.strictEqual(countingSundays(1943, 1946), 6);
|
||||
```
|
||||
|
||||
`countingSundays(1995, 2000)` should return 10.
|
||||
`countingSundays(1995, 2000)` deve retornar 10.
|
||||
|
||||
```js
|
||||
assert.strictEqual(countingSundays(1995, 2000), 10);
|
||||
```
|
||||
|
||||
`countingSundays(1901, 2000)` should return 171.
|
||||
`countingSundays(1901, 2000)` deve retornar 171.
|
||||
|
||||
```js
|
||||
assert.strictEqual(countingSundays(1901, 2000), 171);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3801000cf542c50fe93
|
||||
title: 'Problem 20: Factorial digit sum'
|
||||
title: 'Problema 20: Soma dos algarismos de um fatorial'
|
||||
challengeType: 5
|
||||
forumTopicId: 301839
|
||||
dashedName: problem-20-factorial-digit-sum
|
||||
@ -8,46 +8,46 @@ dashedName: problem-20-factorial-digit-sum
|
||||
|
||||
# --description--
|
||||
|
||||
`n`! means `n` × (`n` − 1) × ... × 3 × 2 × 1
|
||||
`n`! significa `n` × (`n` - 1) × ... × 3 × 2 × 1
|
||||
|
||||
For example, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800,
|
||||
and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27.
|
||||
Por exemplo: 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800.
|
||||
E a soma dos dígitos no número 10! é 3 + 6 + 2 + 8 + 8 + 0 + 0 + 0 = 27.
|
||||
|
||||
Find the sum of the digits `n`!
|
||||
Encontre a soma dos algarismos de `n`!
|
||||
|
||||
# --hints--
|
||||
|
||||
`sumFactorialDigits(10)` should return a number.
|
||||
`sumFactorialDigits(10)` deve retornar um número.
|
||||
|
||||
```js
|
||||
assert(typeof sumFactorialDigits(10) === 'number');
|
||||
```
|
||||
|
||||
`sumFactorialDigits(10)` should return 27.
|
||||
`sumFactorialDigits(10)` deve retornar 27.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(10), 27);
|
||||
```
|
||||
|
||||
`sumFactorialDigits(25)` should return 72.
|
||||
`sumFactorialDigits(25)` deve retornar 72.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(25), 72);
|
||||
```
|
||||
|
||||
`sumFactorialDigits(50)` should return 216.
|
||||
`sumFactorialDigits(50)` deve retornar 216.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(50), 216);
|
||||
```
|
||||
|
||||
`sumFactorialDigits(75)` should return 432.
|
||||
`sumFactorialDigits(75)` deve retornar 432.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(75), 432);
|
||||
```
|
||||
|
||||
`sumFactorialDigits(100)` should return 648.
|
||||
`sumFactorialDigits(100)` deve retornar 648.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(100), 648);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3811000cf542c50fe94
|
||||
title: 'Problem 21: Amicable numbers'
|
||||
title: 'Problema 21: Números amigos'
|
||||
challengeType: 5
|
||||
forumTopicId: 301851
|
||||
dashedName: problem-21-amicable-numbers
|
||||
@ -8,41 +8,41 @@ dashedName: problem-21-amicable-numbers
|
||||
|
||||
# --description--
|
||||
|
||||
Let d(`n`) be defined as the sum of proper divisors of `n` (numbers less than `n` which divide evenly into `n`).
|
||||
Considere d(`n`) sendo igual à soma dos divisores próprios de `n` (divisores próprios de um número positivo `n` são todos os divisores inteiros positivos exceto o próprio `n`).
|
||||
|
||||
If d(`a`) = `b` and d(`b`) = `a`, where `a` ≠ `b`, then `a` and `b` are an amicable pair and each of `a` and `b` are called amicable numbers.
|
||||
Se d(`a`) = `b` e d(`b`) = `a`, onde `a` ≠ `b`, então, `a` e `b` são um par amigável e tanto `a` quanto `b` são chamados de números amigos.
|
||||
|
||||
For example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; therefore d(220) = 284. The proper divisors of 284 are 1, 2, 4, 71 and 142; so d(284) = 220.
|
||||
Por exemplo, os divisores próprios de 220 são 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 e 110. Portanto, d(220) = 284. Os divisores próprios de 284 são 1, 2, 4, 71 e 142. Então d(284) = 220.
|
||||
|
||||
Evaluate the sum of all the amicable numbers under `n`.
|
||||
Calcule a soma de todos os números amigos abaixo de `n`.
|
||||
|
||||
# --hints--
|
||||
|
||||
`sumAmicableNum(1000)` should return a number.
|
||||
`sumAmicableNum(1000)` deve retornar um número.
|
||||
|
||||
```js
|
||||
assert(typeof sumAmicableNum(1000) === 'number');
|
||||
```
|
||||
|
||||
`sumAmicableNum(1000)` should return 504.
|
||||
`sumAmicableNum(1000)` deve retornar 504.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumAmicableNum(1000), 504);
|
||||
```
|
||||
|
||||
`sumAmicableNum(2000)` should return 2898.
|
||||
`sumAmicableNum(2000)` deve retornar 2898.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumAmicableNum(2000), 2898);
|
||||
```
|
||||
|
||||
`sumAmicableNum(5000)` should return 8442.
|
||||
`sumAmicableNum(5000)` deve retornar 8442.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumAmicableNum(5000), 8442);
|
||||
```
|
||||
|
||||
`sumAmicableNum(10000)` should return 31626.
|
||||
`sumAmicableNum(10000)` deve retornar 31626.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumAmicableNum(10000), 31626);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5a51eabcad78bf416f316e2a
|
||||
title: 'Problem 22: Names scores'
|
||||
title: 'Problema 22: Pontuações de nomes'
|
||||
challengeType: 5
|
||||
forumTopicId: 301862
|
||||
dashedName: problem-22-names-scores
|
||||
@ -8,33 +8,33 @@ dashedName: problem-22-names-scores
|
||||
|
||||
# --description--
|
||||
|
||||
Using `names`, an array defined in the background containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a name score.
|
||||
Neste desafio, existe uma variável chamada `names`, que possui um array com mais de 5 mil nomes. Você pode acessá-la através do argumento passado para sua função. A primeira coisa que você precisa fazer é ordenar estes nomes alfabeticamente. Em seguida, descubra a posição de cada letra do nome e some todas as posições. Após calcular a soma, multiplique este valor pela posição do nome dentro do array de nomes.
|
||||
|
||||
For example, when the list is sorted into alphabetical order, COLIN, which is worth 3 + 15 + 12 + 9 + 14 = 53, is the 938th name in the list. So, COLIN would obtain a score of 938 × 53 = 49714.
|
||||
Por exemplo, após ordenar a lista alfabeticamente, o nome COLIN, cujas letras valem 3 + 15 + 12 + 9 + 14 = 53, é o 938º nome na lista. Portanto, o nome COLIN obteria a pontuação de 938 × 53 = 49714.
|
||||
|
||||
What is the total of all the name scores in the array?
|
||||
Qual é o total de todas as pontuações no array de nomes?
|
||||
|
||||
# --hints--
|
||||
|
||||
`namesScores(test1)` should return a number.
|
||||
`namesScores(test1)` deve retornar um número.
|
||||
|
||||
```js
|
||||
assert(typeof namesScores(test1) === 'number');
|
||||
```
|
||||
|
||||
`namesScores(test1)` should return 791.
|
||||
`namesScores(test1)` deve retornar 791.
|
||||
|
||||
```js
|
||||
assert.strictEqual(namesScores(test1), 791);
|
||||
```
|
||||
|
||||
`namesScores(test2)` should return 1468.
|
||||
`namesScores(test2)` deve retornar 1468.
|
||||
|
||||
```js
|
||||
assert.strictEqual(namesScores(test2), 1468);
|
||||
```
|
||||
|
||||
`namesScores(names)` should return 871198282.
|
||||
`namesScores(names)` deve retornar 871198282.
|
||||
|
||||
```js
|
||||
assert.strictEqual(namesScores(names), 871198282);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3831000cf542c50fe96
|
||||
title: 'Problem 23: Non-abundant sums'
|
||||
title: 'Problema 23: Soma dos números não abundantes'
|
||||
challengeType: 5
|
||||
forumTopicId: 301873
|
||||
dashedName: problem-23-non-abundant-sums
|
||||
@ -8,41 +8,41 @@ dashedName: problem-23-non-abundant-sums
|
||||
|
||||
# --description--
|
||||
|
||||
A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means that 28 is a perfect number.
|
||||
Um número perfeito é aquele igual à soma de seus divisores próprios. Por exemplo, a soma dos divisores próprios de 28 é 1 + 2 + 4 + 7 + 14 = 28. Isso significa que 28 é um número perfeito.
|
||||
|
||||
A number `n` is called deficient if the sum of its proper divisors is less than `n` and it is called abundant if this sum exceeds `n`.
|
||||
Um número `n` é chamado de deficiente se a soma de seus divisores próprios for menor que `n`. Se a soma dos divisores próprios for maior que `n`, esse número é chamado de abundante.
|
||||
|
||||
As 12 is the smallest abundant number, 1 + 2 + 3 + 4 + 6 = 16, the smallest number that can be written as the sum of two abundant numbers is 24. By mathematical analysis, it can be shown that all integers greater than 28123 can be written as the sum of two abundant numbers. However, this upper limit cannot be reduced any further by analysis even though it is known that the greatest number that cannot be expressed as the sum of two abundant numbers is less than this limit.
|
||||
Como 12 é o menor número abundante, 1 + 2 + 3 + 4 + 6 = 16, o menor número que pode ser escrito como a soma de dois números abundantes é 24. Usando análise matemática, podemos comprovar que todos os números inteiros maiores que 28123 podem ser escritos como a soma de dois números abundantes. No entanto, este limite máximo não pode ser reduzido através de uma análise, embora se saiba que o maior número que não pode ser expresso como a soma de dois números abundantes é inferior a este limite.
|
||||
|
||||
Find the sum of all positive integers <= `n` which cannot be written as the sum of two abundant numbers.
|
||||
Calcule a soma de todos os números inteiros positivos <= `n` que não podem ser escritos como a soma de dois números abundantes.
|
||||
|
||||
# --hints--
|
||||
|
||||
`sumOfNonAbundantNumbers(10000)` should return a number.
|
||||
`sumOfNonAbundantNumbers(10000)` deve retornar um número.
|
||||
|
||||
```js
|
||||
assert(typeof sumOfNonAbundantNumbers(10000) === 'number');
|
||||
```
|
||||
|
||||
`sumOfNonAbundantNumbers(10000)` should return 3731004.
|
||||
`sumOfNonAbundantNumbers(10000)` deve retornar 3731004.
|
||||
|
||||
```js
|
||||
assert(sumOfNonAbundantNumbers(10000) === 3731004);
|
||||
```
|
||||
|
||||
`sumOfNonAbundantNumbers(15000)` should return 4039939.
|
||||
`sumOfNonAbundantNumbers(15000)` deve retornar 4039939.
|
||||
|
||||
```js
|
||||
assert(sumOfNonAbundantNumbers(15000) === 4039939);
|
||||
```
|
||||
|
||||
`sumOfNonAbundantNumbers(20000)` should return 4159710.
|
||||
`sumOfNonAbundantNumbers(20000)` deve retornar 4159710.
|
||||
|
||||
```js
|
||||
assert(sumOfNonAbundantNumbers(20000) === 4159710);
|
||||
```
|
||||
|
||||
`sumOfNonAbundantNumbers(28123)` should return 4179871.
|
||||
`sumOfNonAbundantNumbers(28123)` deve retornar 4179871.
|
||||
|
||||
```js
|
||||
assert(sumOfNonAbundantNumbers(28123) === 4179871);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3841000cf542c50fe97
|
||||
title: 'Problem 24: Lexicographic permutations'
|
||||
title: 'Problema 24: Permutações lexicográficas'
|
||||
challengeType: 5
|
||||
forumTopicId: 301885
|
||||
dashedName: problem-24-lexicographic-permutations
|
||||
@ -8,39 +8,39 @@ dashedName: problem-24-lexicographic-permutations
|
||||
|
||||
# --description--
|
||||
|
||||
A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we call it lexicographic order. The lexicographic permutations of 0, 1 and 2 are:
|
||||
Uma permutação consiste de elementos que podem formar agrupamentos que se diferenciam apenas pela ordem. Por exemplo, 3124 é uma possível permutação dos algarismos 1, 2, 3 e 4. Se todas as permutações estiverem listadas numericamente ou em ordem alfabética, chamamos isso de ordem lexicográfica. As permutações lexicográficas de 0, 1 e 2 são:
|
||||
|
||||
<div style='text-align: center;'>012 021 102 120 201 210</div>
|
||||
|
||||
What is the `n`th lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9?
|
||||
Qual é a `n`-ésima permutação lexicográfica dos dígitos 0, 1, 2, 3, 4, 5, 6, 7, 8 e 9?
|
||||
|
||||
# --hints--
|
||||
|
||||
`lexicographicPermutations(699999)` should return a number.
|
||||
`lexicographicPermutations(699999)` deve retornar um número.
|
||||
|
||||
```js
|
||||
assert(typeof lexicographicPermutations(699999) === 'number');
|
||||
```
|
||||
|
||||
`lexicographicPermutations(699999)` should return 1938246570.
|
||||
`lexicographicPermutations(699999)` deve retornar 1938246570.
|
||||
|
||||
```js
|
||||
assert(lexicographicPermutations(699999) == 1938246570);
|
||||
```
|
||||
|
||||
`lexicographicPermutations(899999)` should return 2536987410.
|
||||
`lexicographicPermutations(899999)` deve retornar 2536987410.
|
||||
|
||||
```js
|
||||
assert(lexicographicPermutations(899999) == 2536987410);
|
||||
```
|
||||
|
||||
`lexicographicPermutations(900000)` should return 2537014689.
|
||||
`lexicographicPermutations(900000)` deve retornar 2537014689.
|
||||
|
||||
```js
|
||||
assert(lexicographicPermutations(900000) == 2537014689);
|
||||
```
|
||||
|
||||
`lexicographicPermutations(999999)` should return 2783915460.
|
||||
`lexicographicPermutations(999999)` deve retornar 2783915460.
|
||||
|
||||
```js
|
||||
assert(lexicographicPermutations(999999) == 2783915460);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f5351000cf542c510047
|
||||
title: 'Problem 456: Triangles containing the origin II'
|
||||
title: 'Problema 456: Triângulos contendo a origem II'
|
||||
challengeType: 5
|
||||
forumTopicId: 302130
|
||||
dashedName: problem-456-triangles-containing-the-origin-ii
|
||||
@ -8,24 +8,26 @@ dashedName: problem-456-triangles-containing-the-origin-ii
|
||||
|
||||
# --description--
|
||||
|
||||
Define:xn = (1248n mod 32323) - 16161yn = (8421n mod 30103) - 15051
|
||||
Definição:
|
||||
|
||||
Pn = {(x1, y1), (x2, y2), ..., (xn, yn)}
|
||||
$$\start{align} & x_n = ({1248}^n\bmod 32323) - 16161 \\\\ & y_n = ({8421}^n\bmod 30103) - 15051 \\\\ & P_n = \\{(x_1, y_1), (x_2, y_2), \ldots, (x_n, y_n)\\} \end{align}$$
|
||||
|
||||
For example, P8 = {(-14913, -6630), (-10161, 5625), (5226, 11896), (8340, -10778), (15852, -5203), (-15165, 11295), (-1427, -14495), (12407, 1060)}.
|
||||
Por exemplo, $$P_8 = \\{(-14913, -6630), (-10161, 5625), (5226, 11896), (8340, -10778), (15852, -5203), (-15165, 11295), (-1427, -14495), (12407, 1060)\\}$$
|
||||
|
||||
Let C(n) be the number of triangles whose vertices are in Pn which contain the origin in the interior.
|
||||
Considere $C(n)$ o número de triângulos cujos vértices estão em $P_n$ e que contêm a origem em seu interior.
|
||||
|
||||
Examples: C(8) = 20 C(600) = 8950634 C(40 000) = 2666610948988
|
||||
Exemplos:
|
||||
|
||||
Find C(2 000 000).
|
||||
$$\start{align} & C(8) = 20 \\\\ & C(600) = 8\\,950\\,634 \\\\ & C(40\\,000) = 2\\,66610\\,948\\,988 \end{align}$$
|
||||
|
||||
Encontre $C(2\\,000\\,000)$.
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler456()` should return 333333208685971500.
|
||||
`trianglesContainingOriginTwo()` deve retornar `333333208685971500`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler456(), 333333208685971500);
|
||||
assert.strictEqual(trianglesContainingOriginTwo(), 333333208685971500);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -33,12 +35,12 @@ assert.strictEqual(euler456(), 333333208685971500);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler456() {
|
||||
function trianglesContainingOriginTwo() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler456();
|
||||
trianglesContainingOriginTwo();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 596fd036dc1ab896c5db98b1
|
||||
title: Convert seconds to compound duration
|
||||
title: Converter segundos para duração composta
|
||||
challengeType: 5
|
||||
forumTopicId: 302236
|
||||
dashedName: convert-seconds-to-compound-duration
|
||||
@ -8,69 +8,69 @@ dashedName: convert-seconds-to-compound-duration
|
||||
|
||||
# --description--
|
||||
|
||||
Implement a function which:
|
||||
Implementar uma função que:
|
||||
|
||||
<ul>
|
||||
<li>takes a positive integer representing a duration in seconds as input (e.g., <code>100</code>), and</li>
|
||||
<li>returns a string which shows the same duration decomposed into weeks, days, hours, minutes, and seconds as detailed below (e.g., <code>1 min, 40 sec</code>).</li>
|
||||
<li>receba um inteiro positivo que represente uma duração em segundos como entrada (por exemplo, <code>100</code>) e</li>
|
||||
<li>retorna uma string que mostra a mesma duração decomposta em semanas, dias, horas, minutos e segundos detalhados abaixo (por exemplo, <code>1 min, 40 sec</code>).</li>
|
||||
</ul>
|
||||
|
||||
Demonstrate that it passes the following three test-cases:
|
||||
Demonstre que a função passa pelos três casos de teste:
|
||||
|
||||
<div style='font-size:115%; font-weight: bold;'>Test Cases</div>
|
||||
<div style='font-size:115%; font-weight: bold;'>Casos de teste</div>
|
||||
|
||||
| Input number | Output number |
|
||||
| ------------ | ------------------------- |
|
||||
| 7259 | <code>2 hr, 59 sec</code> |
|
||||
| 86400 | <code>1 d</code> |
|
||||
| 6000000 | <code>9 wk, 6 d, 10 hr, 40 min</code> |
|
||||
| Número de entrada | Número de saída |
|
||||
| ----------------- | ------------------------- |
|
||||
| 7259 | <code>2 hr, 59 sec</code> |
|
||||
| 86400 | <code>1 d</code> |
|
||||
| 6000000 | <code>9 wk, 6 d, 10 hr, 40 min</code> |
|
||||
|
||||
<div style="font-size:115%; font-weight: bold;">Details</div>
|
||||
<div style="font-size:115%; font-weight: bold;">Detalhes</div>
|
||||
<ul>
|
||||
<li>
|
||||
The following five units should be used:
|
||||
As cinco unidades a seguir devem ser usadas:
|
||||
|
||||
| Unit | Suffix used in Output | Conversion |
|
||||
| Unidade | Sufixo usado na saída | Conversão |
|
||||
| ------ | --------------------- | --------------------- |
|
||||
| week |!!crwdBlockTags_18_sgaTkcolBdwrc!! | 1 week = 7 days |
|
||||
| day |!!crwdBlockTags_19_sgaTkcolBdwrc!! | 1 day = 24 hours |
|
||||
| hour |!!crwdBlockTags_20_sgaTkcolBdwrc!! | 1 hour = 60 minutes |
|
||||
| minute |!!crwdBlockTags_21_sgaTkcolBdwrc!! | 1 minute = 60 seconds |
|
||||
| week |!!crwdBlockTags_18_sgaTkcolBdwrc!! | 1 semana = 7 dias |
|
||||
| day |!!crwdBlockTags_19_sgaTkcolBdwrc!! | 1 dia = 24 horas |
|
||||
| hour |!!crwdBlockTags_20_sgaTkcolBdwrc!! | 1 hora = 60 minutos |
|
||||
| minute |!!crwdBlockTags_21_sgaTkcolBdwrc!! | 1 minuto = 60 segundos |
|
||||
| second |!!crwdBlockTags_22_sgaTkcolBdwrc!! | --- |
|
||||
|
||||
</li>
|
||||
<li>
|
||||
However, <strong>only</strong> include quantities with non-zero values in the output (e.g., return <code>1 d</code> and not <code>0 wk, 1 d, 0 hr, 0 min, 0 sec</code>).
|
||||
No entanto, <strong>somente</strong> inclua quantidades com valores diferentes de zero na saída (por exemplo, retorne <code>1 d</code> em vez de <code>0 wk, 1 d, 0 hr, 0 min, 0 sec</code>).
|
||||
</li>
|
||||
<li>
|
||||
Give larger units precedence over smaller ones as much as possible (e.g., return <code>2 min, 10 sec</code> and not <code>1 min, 70 sec</code> or <code>130 sec</code>).
|
||||
Dê precedência a unidades maiores sobre unidades menores tanto quanto possível (por exemplo, retorne <code>2 min, 10 sec</code> e não <code>1 min, 70 sec</code> ou <code>130 sec</code>).
|
||||
</li>
|
||||
<li>
|
||||
Mimic the formatting shown in the test-cases (quantities sorted from largest unit to smallest and separated by comma+space; value and unit of each quantity separated by space).
|
||||
Imite a formatação mostrada nos casos de teste (quantidades ordenadas da maior unidade para a menor e separadas por vírgula + espaço, alem de valor e unidade de cada quantidade separada por espaço).
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
# --hints--
|
||||
|
||||
`convertSeconds` should be a function.
|
||||
`convertSeconds` deve ser uma função.
|
||||
|
||||
```js
|
||||
assert(typeof convertSeconds === 'function');
|
||||
```
|
||||
|
||||
`convertSeconds(7259)` should return `2 hr, 59 sec`.
|
||||
`convertSeconds(7259)` deve retornar `2 hr, 59 sec`.
|
||||
|
||||
```js
|
||||
assert.equal(convertSeconds(testCases[0]), results[0]);
|
||||
```
|
||||
|
||||
`convertSeconds(86400)` should return `1 d`.
|
||||
`convertSeconds(86400)` deve retornar `1 d`.
|
||||
|
||||
```js
|
||||
assert.equal(convertSeconds(testCases[1]), results[1]);
|
||||
```
|
||||
|
||||
`convertSeconds(6000000)` should return `9 wk, 6 d, 10 hr, 40 min`.
|
||||
`convertSeconds(6000000)` deve retornar `9 wk, 6 d, 10 hr, 40 min`.
|
||||
|
||||
```js
|
||||
assert.equal(convertSeconds(testCases[2]), results[2]);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 596fda99c69f779975a1b67d
|
||||
title: Count occurrences of a substring
|
||||
title: Contar as ocorrências de uma substring
|
||||
challengeType: 5
|
||||
forumTopicId: 302237
|
||||
dashedName: count-occurrences-of-a-substring
|
||||
@ -8,42 +8,42 @@ dashedName: count-occurrences-of-a-substring
|
||||
|
||||
# --description--
|
||||
|
||||
Create a function, or show a built-in function, to count the number of non-overlapping occurrences of a substring inside a string.
|
||||
Crie uma função, ou mostre uma função integrada para contar o número de ocorrências não sobrepostas de uma substring dentro de uma string.
|
||||
|
||||
The function should take two arguments:
|
||||
A função deve receber dois argumentos:
|
||||
|
||||
<ul>
|
||||
<li>the first argument being the string to search, and</li>
|
||||
<li>the second a substring to be searched for.</li>
|
||||
<li>o primeiro argumento deve ser a string onde ocorrerá a busca, e</li>
|
||||
<li>o segundo deve ser uma substring a ser buscada.</li>
|
||||
</ul>
|
||||
|
||||
It should return an integer count.
|
||||
A função deve retornar uma contagem inteira.
|
||||
|
||||
The matching should yield the highest number of non-overlapping matches.
|
||||
A pesquisa deve produzir o maior número de correspondências não sobrepostas.
|
||||
|
||||
In general, this essentially means matching from left-to-right or right-to-left.
|
||||
Em geral, isto significa, essencialmente, uma correspondência da esquerda para a direita e da direita para a esquerda.
|
||||
|
||||
# --hints--
|
||||
|
||||
`countSubstring` should be a function.
|
||||
`countSubstring` deve ser uma função.
|
||||
|
||||
```js
|
||||
assert(typeof countSubstring === 'function');
|
||||
```
|
||||
|
||||
`countSubstring("the three truths", "th")` should return `3`.
|
||||
`countSubstring("the three truths", "th")` deve retornar `3`.
|
||||
|
||||
```js
|
||||
assert.equal(countSubstring(testCases[0], searchString[0]), results[0]);
|
||||
```
|
||||
|
||||
`countSubstring("ababababab", "abab")` should return `2`.
|
||||
`countSubstring("ababababab", "abab")` deve retornar `2`.
|
||||
|
||||
```js
|
||||
assert.equal(countSubstring(testCases[1], searchString[1]), results[1]);
|
||||
```
|
||||
|
||||
`countSubstring("abaabba*bbaba*bbab", "a*b")` should return `2`.
|
||||
`countSubstring("abaabba*bbaba*bbab", "a*b")` deve retornar `2`.
|
||||
|
||||
```js
|
||||
assert.equal(countSubstring(testCases[2], searchString[2]), results[2]);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 59713bd26bdeb8a594fb9413
|
||||
title: Count the coins
|
||||
title: Contar moedas
|
||||
challengeType: 5
|
||||
forumTopicId: 302238
|
||||
dashedName: count-the-coins
|
||||
@ -8,51 +8,51 @@ dashedName: count-the-coins
|
||||
|
||||
# --description--
|
||||
|
||||
There are four types of common coins in [US](https://en.wikipedia.org/wiki/United_States) currency:
|
||||
Existem quatro tipos de moedas comuns no dinheiro dos [EUA](https://en.wikipedia.org/wiki/United_States):
|
||||
|
||||
<ul>
|
||||
<li>quarters (25 cents)</li>
|
||||
<li>dimes (10 cents)</li>
|
||||
<li>nickels (5 cents), and</li>
|
||||
<li>pennies (1 cent)</li>
|
||||
<li>quarters (25 centavos)</li>
|
||||
<li>dimes (10 centavos)</li>
|
||||
<li>nickels (5 centavos) e</li>
|
||||
<li>pennies (1 centavo)</li>
|
||||
</ul>
|
||||
|
||||
<p>There are six ways to make change for 15 cents:</p>
|
||||
<p>Há seis maneiras de fazer troco com 15 centavos:</p>
|
||||
|
||||
<ul>
|
||||
<li>A dime and a nickel</li>
|
||||
<li>A dime and 5 pennies</li>
|
||||
<li>Um dime e um nickel</li>
|
||||
<li>Um dime e 5 pennies</li>
|
||||
<li>3 nickels</li>
|
||||
<li>2 nickels and 5 pennies</li>
|
||||
<li>A nickel and 10 pennies</li>
|
||||
<li>2 nickels e 5 pennies</li>
|
||||
<li>Um nickel e 10 pennies</li>
|
||||
<li>15 pennies</li>
|
||||
</ul>
|
||||
|
||||
# --instructions--
|
||||
|
||||
Implement a function to determine how many ways there are to make change for a given input, `cents`, that represents an amount of US pennies using these common coins.
|
||||
Implemente uma função para determinar quantas maneiras há para fazer troco para uma determinada entrada, `cents`, que representa uma quantidade de centavos americanos usando essas moedas comuns.
|
||||
|
||||
# --hints--
|
||||
|
||||
`countCoins` should be a function.
|
||||
`countCoins` deve ser uma função.
|
||||
|
||||
```js
|
||||
assert(typeof countCoins === 'function');
|
||||
```
|
||||
|
||||
`countCoins(15)` should return `6`.
|
||||
`countCoins(15)` deve retornar `6`.
|
||||
|
||||
```js
|
||||
assert.equal(countCoins(15), 6);
|
||||
```
|
||||
|
||||
`countCoins(85)` shouls return `163`.
|
||||
`countCoins(85)` deve retornar `163`.
|
||||
|
||||
```js
|
||||
assert.equal(countCoins(85), 163);
|
||||
```
|
||||
|
||||
`countCoins(100)` should return `242`.
|
||||
`countCoins(100)` deve retornar `242`.
|
||||
|
||||
```js
|
||||
assert.equal(countCoins(100), 242);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 59713da0a428c1a62d7db430
|
||||
title: Cramer's rule
|
||||
title: A regra de Cramer
|
||||
challengeType: 5
|
||||
forumTopicId: 302239
|
||||
dashedName: cramers-rule
|
||||
@ -8,43 +8,43 @@ dashedName: cramers-rule
|
||||
|
||||
# --description--
|
||||
|
||||
In [linear algebra](https://en.wikipedia.org/wiki/linear algebra "wp: linear algebra"), [Cramer's rule](https://en.wikipedia.org/wiki/Cramer's rule "wp: Cramer's rule") is an explicit formula for the solution of a [system of linear equations](https://en.wikipedia.org/wiki/system of linear equations "wp: system of linear equations") with as many equations as unknowns, valid whenever the system has a unique solution. It expresses the solution in terms of the determinants of the (square) coefficient matrix and of matrices obtained from it by replacing one column by the vector of right hand sides of the equations.
|
||||
Em [álgebra linear](https://en.wikipedia.org/wiki/linear algebra "wp: linear algebra"), a [Regra de Cramer](https://en.wikipedia.org/wiki/Cramer's rule "wp: Cramer's rule") é uma fórmula explícita para a solução de um [sistema de equações lineares](https://en.wikipedia.org/wiki/system of linear equations "wp: system of linear equations") com tantas equações quanto variáveis. Essa regra é válida sempre que o sistema tiver uma solução única. Ela exprime a solução em termos dos determinantes da matriz do coeficiente (quadrada) e de matrizes obtidas a partir dela substituindo uma coluna pelo vetor da direita das equações.
|
||||
|
||||
Given
|
||||
Dado
|
||||
|
||||
$\\left\\{\\begin{matrix}a_1x + b_1y + c_1z&= {\\color{red}d_1}\\\\a_2x + b_2y + c_2z&= {\\color{red}d_2}\\\\a_3x + b_3y + c_3z&= {\\color{red}d_3}\\end{matrix}\\right.$
|
||||
|
||||
which in matrix format is
|
||||
que no formato de matriz é
|
||||
|
||||
$\\begin{bmatrix} a_1 & b_1 & c_1 \\\\ a_2 & b_2 & c_2 \\\\ a_3 & b_3 & c_3 \\end{bmatrix}\\begin{bmatrix} x \\\\ y \\\\ z \\end{bmatrix}=\\begin{bmatrix} {\\color{red}d_1} \\\\ {\\color{red}d_2} \\\\ {\\color{red}d_3} \\end{bmatrix}.$
|
||||
|
||||
Then the values of $x, y$ and $z$ can be found as follows:
|
||||
Então, os valores de $x, y$ e $z$ podem ser encontrados da seguinte forma:
|
||||
|
||||
$x = \\frac{\\begin{vmatrix} {\\color{red}d_1} & b_1 & c_1 \\\\ {\\color{red}d_2} & b_2 & c_2 \\\\ {\\color{red}d_3} & b_3 & c_3 \\end{vmatrix} } { \\begin{vmatrix} a_1 & b_1 & c_1 \\\\ a_2 & b_2 & c_2 \\\\ a_3 & b_3 & c_3 \\end{vmatrix}}, \\quad y = \\frac {\\begin{vmatrix} a_1 & {\\color{red}d_1} & c_1 \\\\ a_2 & {\\color{red}d_2} & c_2 \\\\ a_3 & {\\color{red}d_3} & c_3 \\end{vmatrix}} {\\begin{vmatrix} a_1 & b_1 & c_1 \\\\ a_2 & b_2 & c_2 \\\\ a_3 & b_3 & c_3 \\end{vmatrix}}, \\text{ and }z = \\frac { \\begin{vmatrix} a_1 & b_1 & {\\color{red}d_1} \\\\ a_2 & b_2 & {\\color{red}d_2} \\\\ a_3 & b_3 & {\\color{red}d_3} \\end{vmatrix}} {\\begin{vmatrix} a_1 & b_1 & c_1 \\\\ a_2 & b_2 & c_2 \\\\ a_3 & b_3 & c_3 \\end{vmatrix} }.$
|
||||
|
||||
# --instructions--
|
||||
|
||||
Given the following system of equations:
|
||||
Dado o seguinte sistema de equações:
|
||||
|
||||
$\\begin{cases} 2w-x+5y+z=-3 \\\\ 3w+2x+2y-6z=-32 \\\\ w+3x+3y-z=-47 \\\\ 5w-2x-3y+3z=49 \\\\ \\end{cases}$
|
||||
|
||||
solve for $w$, $x$, $y$ and $z$, using Cramer's rule.
|
||||
resolva para as variáveis $w$, $x$, $y$ e $z$ usando a Regra de Cramer.
|
||||
|
||||
# --hints--
|
||||
|
||||
`cramersRule` should be a function.
|
||||
`cramersRule` deve ser uma função.
|
||||
|
||||
```js
|
||||
assert(typeof cramersRule === 'function');
|
||||
```
|
||||
|
||||
`cramersRule([[2, -1, 5, 1], [3, 2, 2, -6], [1, 3, 3, -1], [5, -2, -3, 3]], [-3, -32, -47, 49])` should return `[2, -12, -4, 1]`.
|
||||
`cramersRule([[2, -1, 5, 1], [3, 2, 2, -6], [1, 3, 3, -1], [5, -2, -3, 3]], [-3, -32, -47, 49])` deve retornar `[2, -12, -4, 1]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(cramersRule(matrices[0], freeTerms[0]), answers[0]);
|
||||
```
|
||||
|
||||
`cramersRule([[3, 1, 1], [2, 2, 5], [1, -3, -4]], [3, -1, 2])` should return `[1, 1, -1]`.
|
||||
`cramersRule([[3, 1, 1], [2, 2, 5], [1, -3, -4]], [3, -1, 2])` deve retornar `[1, 1, -1]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(cramersRule(matrices[1], freeTerms[1]), answers[1]);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5a23c84252665b21eecc7e03
|
||||
title: Cumulative standard deviation
|
||||
title: Desvio padrão acumulado
|
||||
challengeType: 5
|
||||
forumTopicId: 302240
|
||||
dashedName: cumulative-standard-deviation
|
||||
@ -8,41 +8,41 @@ dashedName: cumulative-standard-deviation
|
||||
|
||||
# --description--
|
||||
|
||||
Write a function that takes an array of numbers as parameter and returns the [standard deviation](https://en.wikipedia.org/wiki/Standard Deviation) of the series.
|
||||
Escreva uma função que recebe um array de números como parâmetro e retorna o [desvio padrão](https://pt.wikipedia.org/wiki/Desvio_padr%C3%A3o) da série.
|
||||
|
||||
# --hints--
|
||||
|
||||
`standardDeviation` should be a function.
|
||||
`standardDeviation` deve ser uma função.
|
||||
|
||||
```js
|
||||
assert(typeof standardDeviation == 'function');
|
||||
```
|
||||
|
||||
`standardDeviation([2, 4, 4, 4, 5, 5, 7, 9])` should return a number.
|
||||
`standardDeviation([2, 4, 4, 4, 5, 5, 7, 9])` deve retornar um número.
|
||||
|
||||
```js
|
||||
assert(typeof standardDeviation([2, 4, 4, 4, 5, 5, 7, 9]) == 'number');
|
||||
```
|
||||
|
||||
`standardDeviation([2, 4, 4, 4, 5, 5, 7, 9])` should return `2`.
|
||||
`standardDeviation([2, 4, 4, 4, 5, 5, 7, 9])` deve retornar `2`.
|
||||
|
||||
```js
|
||||
assert.equal(standardDeviation([2, 4, 4, 4, 5, 5, 7, 9]), 2);
|
||||
```
|
||||
|
||||
`standardDeviation([600, 470, 170, 430, 300])` should return `147.323`.
|
||||
`standardDeviation([600, 470, 170, 430, 300])` deve retornar `147.323`.
|
||||
|
||||
```js
|
||||
assert.equal(standardDeviation([600, 470, 170, 430, 300]), 147.323);
|
||||
```
|
||||
|
||||
`standardDeviation([75, 83, 96, 100, 121, 125])` should return `18.239`.
|
||||
`standardDeviation([75, 83, 96, 100, 121, 125])` deve retornar `18.239`.
|
||||
|
||||
```js
|
||||
assert.equal(standardDeviation([75, 83, 96, 100, 121, 125]), 18.239);
|
||||
```
|
||||
|
||||
`standardDeviation([23, 37, 45, 49, 56, 63, 63, 70, 72, 82])` should return `16.87`.
|
||||
`standardDeviation([23, 37, 45, 49, 56, 63, 63, 70, 72, 82])` deve retornar `16.87`.
|
||||
|
||||
```js
|
||||
assert.equal(
|
||||
@ -51,7 +51,7 @@ assert.equal(
|
||||
);
|
||||
```
|
||||
|
||||
`standardDeviation([271, 354, 296, 301, 333, 326, 285, 298, 327, 316, 287, 314])` should return `22.631`.
|
||||
`standardDeviation([271, 354, 296, 301, 333, 326, 285, 298, 327, 316, 287, 314])` deve retornar `22.631`.
|
||||
|
||||
```js
|
||||
assert.equal(
|
||||
|
Reference in New Issue
Block a user