chore(i18n,curriculum): update translations (#43375)

This commit is contained in:
camperbot
2021-09-06 03:52:36 -07:00
committed by GitHub
parent b952bbb179
commit 148cf18412
70 changed files with 650 additions and 660 deletions

View File

@ -1,6 +1,6 @@
---
id: 5a23c84252665b21eecc7edf
title: Least common multiple
title: Mínimo múltiplo comum
challengeType: 5
forumTopicId: 302301
dashedName: least-common-multiple
@ -8,51 +8,51 @@ dashedName: least-common-multiple
# --description--
The least common multiple of 12 and 18 is 36, because 12 is a factor (12 × 3 = 36), and 18 is a factor (18 × 2 = 36), and there is no positive integer less than 36 that has both factors. As a special case, if either *m* or *n* is zero, then the least common multiple is zero. One way to calculate the least common multiple is to iterate all the multiples of *m*, until you find one that is also a multiple of *n*. If you already have *gcd* for [greatest common divisor](https://rosettacode.org/wiki/greatest common divisor), then this formula calculates *lcm*. ( \\operatorname{lcm}(m, n) = \\frac{|m \\times n|}{\\operatorname{gcd}(m, n)} )
O mínimo múltiplo comum de 12 e 18 é 36, porque 12 é um fator (12 × 3 = 36) e 18 é um fator (18 × 2 = 36). Além disso, não há nenhum inteiro positivo menor que 36 que tenha ambos os fatores. Por ser um caso especial, se *m* ou *n* for zero, o mínimo múltiplo comum é zero. Uma maneira de calcular o mínimo múltiplo comum é iterar todos os múltiplos de *m*, até encontrar um que também seja múltiplo de *n*. Se você já tiver o *gcd* para o [máximo divisor comum](https://rosettacode.org/wiki/greatest common divisor), esta fórmula calcula o *lcm*. ( \\operatorname{lcm}(m, n) = \\frac{|m \\times n|}{\\operatorname{gcd}(m, n)} )
# --instructions--
Compute the least common multiple of an array of integers. Given *m* and *n*, the least common multiple is the smallest positive integer that has both *m* and *n* as factors.
Calcule o mínimo múltiplo comum de um array de números inteiros. Dados *m* e *n*, o mínimo múltiplo comum é o menor número inteiro positivo que tenha tanto *m* quanto *n* como fatores.
# --hints--
`LCM` should be a function.
`LCM` deve ser uma função.
```js
assert(typeof LCM == 'function');
```
`LCM([2, 4, 8])` should return a number.
`LCM([2, 4, 8])` deve retornar um número.
```js
assert(typeof LCM([2, 4, 8]) == 'number');
```
`LCM([2, 4, 8])` should return `8`.
`LCM([2, 4, 8])` deve retornar `8`.
```js
assert.equal(LCM([2, 4, 8]), 8);
```
`LCM([4, 8, 12])` should return `24`.
`LCM([4, 8, 12])` deve retornar `24`.
```js
assert.equal(LCM([4, 8, 12]), 24);
```
`LCM([3, 4, 5, 12, 40])` should return `120`.
`LCM([3, 4, 5, 12, 40])` deve retornar `120`.
```js
assert.equal(LCM([3, 4, 5, 12, 40]), 120);
```
`LCM([11, 33, 90])` should return `990`.
`LCM([11, 33, 90])` deve retornar `990`.
```js
assert.equal(LCM([11, 33, 90]), 990);
```
`LCM([-50, 25, -45, -18, 90, 447])` should return `67050`.
`LCM([-50, 25, -45, -18, 90, 447])` deve retornar `67050`.
```js
assert.equal(LCM([-50, 25, -45, -18, 90, 447]), 67050);