chore(i18n,curriculum): update translations (#43881)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3e61000cf542c50fef9
|
||||
title: 'Problem 122: Efficient exponentiation'
|
||||
title: 'Problema 122: Exponenciação eficiente'
|
||||
challengeType: 5
|
||||
forumTopicId: 301749
|
||||
dashedName: problem-122-efficient-exponentiation
|
||||
@ -8,28 +8,28 @@ dashedName: problem-122-efficient-exponentiation
|
||||
|
||||
# --description--
|
||||
|
||||
The most naive way of computing n15 requires fourteen multiplications:
|
||||
A maneira mais ingênua de calcular $n^{15}$ requer 14 multiplicações:
|
||||
|
||||
n × n × ... × n = n15
|
||||
$$n × n × \ldots × n = n^{15}$$
|
||||
|
||||
But using a "binary" method you can compute it in six multiplications:
|
||||
Mas usando um método "binário" você pode calculá-lo em seis multiplicações:
|
||||
|
||||
n × n = n2n2 × n2 = n4n4 × n4 = n8n8 × n4 = n12n12 × n2 = n14n14 × n = n15
|
||||
$$\begin{align} & n × n = n^2\\\\ & n^2 × n^2 = n^4\\\\ & n^4 × n^4 = n^8\\\\ & n^8 × n^4 = n^{12}\\\\ & n^{12} × n^2 = n^{14}\\\\ & n^{14} × n = n^{15} \end{align}$$
|
||||
|
||||
However it is yet possible to compute it in only five multiplications:
|
||||
No entanto, ainda é possível calculá-lo em apenas cinco multiplicações:
|
||||
|
||||
n × n = n2n2 × n = n3n3 × n3 = n6n6 × n6 = n12n12 × n3 = n15
|
||||
$$\begin{align} & n × n = n^2\\\\ & n^2 × n = n^3\\\\ & n^3 × n^3 = n^6\\\\ & n^6 × n^6 = n^{12}\\\\ & n^{12} × n^3 = n^{15} \end{align}$$
|
||||
|
||||
We shall define m(k) to be the minimum number of multiplications to compute nk; for example m(15) = 5.
|
||||
Definiremos $m(k)$ como o número mínimo de multiplicações para calcular $n^k$; por exemplo, $m(15) = 5$.
|
||||
|
||||
For 1 ≤ k ≤ 200, find ∑ m(k).
|
||||
Para $1 ≤ k ≤ 200$, encontre $\sum{m(k)}$.
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler122()` should return 1582.
|
||||
`efficientExponentation()` deve retornar `1582`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler122(), 1582);
|
||||
assert.strictEqual(efficientExponentation(), 1582);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -37,12 +37,12 @@ assert.strictEqual(euler122(), 1582);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler122() {
|
||||
function efficientExponentation() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler122();
|
||||
efficientExponentation();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3e91000cf542c50fefc
|
||||
title: 'Problem 125: Palindromic sums'
|
||||
title: 'Problema 125: Somas de palíndromo'
|
||||
challengeType: 5
|
||||
forumTopicId: 301752
|
||||
dashedName: problem-125-palindromic-sums
|
||||
@ -8,18 +8,18 @@ dashedName: problem-125-palindromic-sums
|
||||
|
||||
# --description--
|
||||
|
||||
The palindromic number 595 is interesting because it can be written as the sum of consecutive squares: 62 + 72 + 82 + 92 + 102 + 112 + 122.
|
||||
O número palíndromo 595 é interessante, porque ele pode ser escrito como a soma dos quadrados consecutivos: $6^2 + 7^2 + 8^2 + 9^2 + 9^2 + 10^2 + 11^2 + 12^2$.
|
||||
|
||||
There are exactly eleven palindromes below one-thousand that can be written as consecutive square sums, and the sum of these palindromes is 4164. Note that 1 = 02 + 12 has not been included as this problem is concerned with the squares of positive integers.
|
||||
Existem exatamente onze palíndromos abaixo de mil que podem ser escritos como somas quadradas consecutivas. A soma destes palíndromos é 4164. Observe que $1 = 0^2 + 1^2$ não foi incluído pois este problema está interessado nos quadrados de inteiros positivos.
|
||||
|
||||
Find the sum of all the numbers less than 108 that are both palindromic and can be written as the sum of consecutive squares.
|
||||
Calcule a soma de todos os números menores que $10^8$ que são palíndromos e podem ser escritos como a soma de quadrados consecutivos.
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler125()` should return 2906969179.
|
||||
`palindromicSums()` deve retornar `2906969179`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler125(), 2906969179);
|
||||
assert.strictEqual(palindromicSums(), 2906969179);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -27,12 +27,12 @@ assert.strictEqual(euler125(), 2906969179);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler125() {
|
||||
function palindromicSums() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler125();
|
||||
palindromicSums();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3ea1000cf542c50fefd
|
||||
title: 'Problem 126: Cuboid layers'
|
||||
title: 'Problema 126: Camadas de cuboides'
|
||||
challengeType: 5
|
||||
forumTopicId: 301753
|
||||
dashedName: problem-126-cuboid-layers
|
||||
@ -8,16 +8,26 @@ dashedName: problem-126-cuboid-layers
|
||||
|
||||
# --description--
|
||||
|
||||
The minimum number of cubes to cover every visible face on a cuboid measuring 3 x 2 x 1 is twenty-two.
|
||||
A número mínimo de cubos para cobrir todas as faces visíveis de um cuboide medindo 3 x 2 x 1 é 22.
|
||||
|
||||
If we then add a second layer to this solid it would require forty-six cubes to cover every visible face, the third layer would require seventy-eight cubes, and the fourth layer would require one-hundred and eighteen cubes to cover every visible face. However, the first layer on a cuboid measuring 5 x 1 x 1 also requires twenty-two cubes; similarly the first layer on cuboids measuring 5 x 3 x 1, 7 x 2 x 1, and 11 x 1 x 1 all contain forty-six cubes. We shall define C(n) to represent the number of cuboids that contain n cubes in one of its layers. So C(22) = 2, C(46) = 4, C(78) = 5, and C(118) = 8. It turns out that 154 is the least value of n for which C(n) = 10. Find the least value of n for which C(n) = 1000.
|
||||
<img class="img-responsive center-block" alt="Cuboide 3 x 2 x 1 coberto por 22 cubos 1 x 1 x 1" src="https://cdn.freecodecamp.org/curriculum/project-euler/cuboid-layers.png" style="background-color: white; padding: 10px;" />
|
||||
|
||||
Se adicionarmos uma segunda camada a este sólido, precisaremos de 46 cubos para cobrir todas as faces visíveis, a terceira camada precisará de 78 cubos e a quarta camada precisará de 118 cubos para cobrir todas as faces visíveis.
|
||||
|
||||
No entanto, a primeira camada de um cuboide que mede 5 x 1 x 1 também precisa de 22 cubos; analogamente, a primeira camada de cuboides que medem 5 x 3 x 1, 7 x 2 x 1 e 11 x 1 x 1 contém 46 cubos.
|
||||
|
||||
Definiremos $C(n)$ como a representação do número de cubos que contêm $n$ cubos em uma de suas camadas. Portanto, $C(22) = 2$, $C(46) = 4$, $C(78) = 5$ e $C(118) = 8$.
|
||||
|
||||
Acontece que 154 é o menor valor de $n$ no qual $C(n) = 10$.
|
||||
|
||||
Calcule o menor valor de $n$ no qual $C(n) = 1000$.
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler126()` should return 18522.
|
||||
`cuboidLayers()` deve retornar `18522`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler126(), 18522);
|
||||
assert.strictEqual(cuboidLayers(), 18522);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -25,12 +35,12 @@ assert.strictEqual(euler126(), 18522);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler126() {
|
||||
function cuboidLayers() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler126();
|
||||
cuboidLayers();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
Reference in New Issue
Block a user