chore(i18n,learn): processed translations (#45621)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f4801000cf542c50ff93
|
||||
title: 'Problem 276: Primitive Triangles'
|
||||
title: 'Problema 276: Triángulos primitivos'
|
||||
challengeType: 5
|
||||
forumTopicId: 301926
|
||||
dashedName: problem-276-primitive-triangles
|
||||
@ -8,18 +8,18 @@ dashedName: problem-276-primitive-triangles
|
||||
|
||||
# --description--
|
||||
|
||||
Consider the triangles with integer sides a, b and c with a ≤ b ≤ c.
|
||||
Consideremos los triángulos con lados enteros $a$, $b$ y $c$ con $a ≤ b ≤ c$.
|
||||
|
||||
An integer sided triangle (a,b,c) is called primitive if gcd(a,b,c)=1.
|
||||
Un triángulo de lados enteros $(a,b,c)$ se llama primitivo si $gcd(a,b,c) = 1$.
|
||||
|
||||
How many primitive integer sided triangles exist with a perimeter not exceeding 10 000 000?
|
||||
¿Cuántos triángulos primitivos de lados enteros existen con un perímetro que no supere los $10\,000\,000$?
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler276()` should return 5777137137739633000.
|
||||
`Triángulos primitivos()` debe devolver `5777137137739633000`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler276(), 5777137137739633000);
|
||||
assert.strictEqual(primitiveTriangles(), 5777137137739633000);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -27,12 +27,12 @@ assert.strictEqual(euler276(), 5777137137739633000);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler276() {
|
||||
function primitiveTriangles() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler276();
|
||||
primitiveTriangles();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f4e51000cf542c50fff7
|
||||
title: 'Problem 376: Nontransitive sets of dice'
|
||||
title: 'Problema 376: Conjuntos no transitorios de dados'
|
||||
challengeType: 5
|
||||
forumTopicId: 302038
|
||||
dashedName: problem-376-nontransitive-sets-of-dice
|
||||
@ -8,30 +8,45 @@ dashedName: problem-376-nontransitive-sets-of-dice
|
||||
|
||||
# --description--
|
||||
|
||||
Consider the following set of dice with nonstandard pips:
|
||||
Considera el siguiente conjunto de dados con pips no estándar:
|
||||
|
||||
Die A: 1 4 4 4 4 4 Die B: 2 2 2 5 5 5 Die C: 3 3 3 3 3 6
|
||||
$$\Inicio{array}{} \text{Die A: } & 1 & 4 & 4 & 4 & 4 & 4 \\\\
|
||||
\text{Die B: } & 2 & 2 & 2 & 5 & 5 & 5 \\\\ \text{Die C: } & 3 & 3 & 3 & 3 & 3 & 6 \\\\
|
||||
\fin{array}$$
|
||||
|
||||
A game is played by two players picking a die in turn and rolling it. The player who rolls the highest value wins.
|
||||
Un juego es jugado por dos jugadores que escogen un dado por turno y lo lanzan. El jugador que tire el valor más alto gana.
|
||||
|
||||
If the first player picks die A and the second player picks die B we get P(second player wins) = 7/12 > 1/2
|
||||
Si el primer jugador escoge el dado $A$ y el segundo jugador toma el dado $B$ obtenemos
|
||||
|
||||
If the first player picks die B and the second player picks die C we get P(second player wins) = 7/12 > 1/2
|
||||
$P(\text{second player wins}) = \frac{7}{12} > \frac{1}{2}$
|
||||
|
||||
If the first player picks die C and the second player picks die A we get P(second player wins) = 25/36 > 1/2
|
||||
Si el primer jugador elige el dado $B$ y el segundo jugador elige el dado $C$ obtenemos
|
||||
|
||||
So whatever die the first player picks, the second player can pick another die and have a larger than 50% chance of winning. A set of dice having this property is called a nontransitive set of dice.
|
||||
$P(\text{second player wins}) = \frac{7}{12} > \frac{1}{2}$
|
||||
|
||||
We wish to investigate how many sets of nontransitive dice exist. We will assume the following conditions:There are three six-sided dice with each side having between 1 and N pips, inclusive. Dice with the same set of pips are equal, regardless of which side on the die the pips are located. The same pip value may appear on multiple dice; if both players roll the same value neither player wins. The sets of dice {A,B,C}, {B,C,A} and {C,A,B} are the same set.
|
||||
Si el primer jugador elige el dado $C$ y el segundo jugador elige el dado $A$ obtenemos
|
||||
|
||||
For N = 7 we find there are 9780 such sets. How many are there for N = 30 ?
|
||||
$P(\text{second player wins}) = \frac{25}{36} > \frac{1}{2}$
|
||||
|
||||
Así que, sea cual sea el dado que el primer jugador escoja, el segundo jugador puede elegir otro dado y tener más de un 50% de probabilidades de ganar. Un conjunto de dados que tienen esta propiedad se llama un conjunto no transitivo de dados.
|
||||
|
||||
Queremos investigar cuántos conjuntos de dados no transitivos existen. Asumiremos las siguientes condiciones:
|
||||
|
||||
- Hay tres dados de seis caras con cada lado que tiene entre 1 y $N$ pips, incluído.
|
||||
- Los dados con el mismo conjunto de puntos son iguales, independientemente del lado en el que se encuentren los puntos.
|
||||
- El mismo valor de puntos puede aparecer en múltiples dados; si ambos jugadores tiran el mismo valor ningún jugador gana.
|
||||
- Los conjuntos de dados {A, B, C}, {B, C, A} y {C, A, B} son el mismo conjunto.
|
||||
|
||||
Para N = 7 encontramos que hay 9780 conjuntos de este tipo.
|
||||
|
||||
¿Cuántos hay para N = 30?
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler376()` should return 973059630185670.
|
||||
`nontransitiveSetsOfDice()` debería devolver `973059630185670`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler376(), 973059630185670);
|
||||
assert.strictEqual(nontransitiveSetsOfDice(), 973059630185670);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -39,12 +54,12 @@ assert.strictEqual(euler376(), 973059630185670);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler376() {
|
||||
function nontransitiveSetsOfDice() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler376();
|
||||
nontransitiveSetsOfDice();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f50c1000cf542c51001e
|
||||
title: 'Problem 415: Titanic sets'
|
||||
title: 'Problema 415: Conjuntos Titanic'
|
||||
challengeType: 5
|
||||
forumTopicId: 302084
|
||||
dashedName: problem-415-titanic-sets
|
||||
@ -8,22 +8,22 @@ dashedName: problem-415-titanic-sets
|
||||
|
||||
# --description--
|
||||
|
||||
A set of lattice points S is called a titanic set if there exists a line passing through exactly two points in S.
|
||||
Un conjunto de puntos de celosía $S$ se denomina conjunto titanic si existe una línea que pasa exactamente por dos puntos en $S$.
|
||||
|
||||
An example of a titanic set is S = {(0, 0), (0, 1), (0, 2), (1, 1), (2, 0), (1, 0)}, where the line passing through (0, 1) and (2, 0) does not pass through any other point in S.
|
||||
Un ejemplo de un conjunto titanic es $S = \\{(0, 0), (0, 1), (0, 2), (1, 1), (2, 0), (1, 0)\\}$, donde la linea pasa a través de (0, 1) y (2, 0) no pasa a través de ningun otro punto en $S$.
|
||||
|
||||
On the other hand, the set {(0, 0), (1, 1), (2, 2), (4, 4)} is not a titanic set since the line passing through any two points in the set also passes through the other two.
|
||||
Por otra parte, el conjunto {(0, 0), (1, 1), (2, 2), (4, 4)} no es un conjunto titanic ya que la línea que pasa por cualquiera de los dos puntos del conjunto también pasa por los otros dos.
|
||||
|
||||
For any positive integer N, let T(N) be the number of titanic sets S whose every point (x, y) satisfies 0 ≤ x, y ≤ N. It can be verified that T(1) = 11, T(2) = 494, T(4) = 33554178, T(111) mod 108 = 13500401 and T(105) mod 108 = 63259062.
|
||||
Para cualquier entero positivo $N$, sea $T(N)$ el número de conjuntos titánicos $S$ cuyos puntos ($x$, $y$) satisfacen $ 0 ≤ x$, $y ≤ N$. Se puede comprobar que $T(1) = 11$, $T(2) = 494$, $T(4) = 33\4\ 178$, $T(111)\bmod {10}^8 = 13\ 500\ 401$ y $T({10}^5)\bmod {10}^8 = 63\ 259\ 062$.
|
||||
|
||||
Find T(1011) mod 108.
|
||||
Encuentra $T({10}^{11})\bmod {10}^8$.
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler415()` should return 55859742.
|
||||
`titanicSets()` debe regresar `55859742`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler415(), 55859742);
|
||||
assert.strictEqual(titanicSets(), 55859742);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -31,12 +31,12 @@ assert.strictEqual(euler415(), 55859742);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler415() {
|
||||
function titanicSets() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler415();
|
||||
titanicSets();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f5351000cf542c510047
|
||||
title: 'Problem 456: Triangles containing the origin II'
|
||||
title: 'Problema 456: Triángulos que contienen el origen II'
|
||||
challengeType: 5
|
||||
forumTopicId: 302130
|
||||
dashedName: problem-456-triangles-containing-the-origin-ii
|
||||
@ -8,24 +8,28 @@ dashedName: problem-456-triangles-containing-the-origin-ii
|
||||
|
||||
# --description--
|
||||
|
||||
Define:xn = (1248n mod 32323) - 16161yn = (8421n mod 30103) - 15051
|
||||
Definiendo:
|
||||
|
||||
Pn = {(x1, y1), (x2, y2), ..., (xn, yn)}
|
||||
$$\begin{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 ejemplo, $$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.
|
||||
Sea $C(n)$ el número de triángulos cuyos vértices están en $P_n$ que contiene el origen en el interior.
|
||||
|
||||
Examples: C(8) = 20 C(600) = 8950634 C(40 000) = 2666610948988
|
||||
Ejemplos:
|
||||
|
||||
Find C(2 000 000).
|
||||
$$\begin{align} & C(8) = 20 \\\\
|
||||
& C(600) = 8\\,950\\,634 \\\\ & C(40\\,000) = 2\\,666\\,610\\,948\\,988 \end{align}$$
|
||||
|
||||
Calcular $C(2\\,000\\,000)$.
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler456()` should return 333333208685971500.
|
||||
`trianglesContainingOriginTwo()` debería retornar `333333208685971500`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler456(), 333333208685971500);
|
||||
assert.strictEqual(trianglesContainingOriginTwo(), 333333208685971500);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -33,12 +37,12 @@ assert.strictEqual(euler456(), 333333208685971500);
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler456() {
|
||||
function trianglesContainingOriginTwo() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
euler456();
|
||||
trianglesContainingOriginTwo();
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5a23c84252665b21eecc7e03
|
||||
title: Cumulative standard deviation
|
||||
title: Desviación estándar acumulada
|
||||
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.
|
||||
Escriba una función que tome un array de números como parámetro y devuelva la [ desviación estándard](https://en.wikipedia.org/wiki/Standard_deviation) de la serie.
|
||||
|
||||
# --hints--
|
||||
|
||||
`standardDeviation` should be a function.
|
||||
`standardDeviation` debe ser una función.
|
||||
|
||||
```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])` debe devolver un 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])` debe devolver `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])` debe devolver `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])` debe devolver `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])` debe devolver `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])` debe devolver `22.631`.
|
||||
|
||||
```js
|
||||
assert.equal(
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5a23c84252665b21eecc802a
|
||||
title: Stream Merge
|
||||
title: Fusión de Flujo
|
||||
challengeType: 5
|
||||
forumTopicId: 302326
|
||||
dashedName: stream-merge
|
||||
@ -8,17 +8,17 @@ dashedName: stream-merge
|
||||
|
||||
# --description--
|
||||
|
||||
Write a function that takes multiple sorted arrays of items, and returns one array of sorted items.
|
||||
Escribe una función que tome múltiples arreglos ordenados de elementos, y devuelva un arreglo de elementos ordenados.
|
||||
|
||||
# --hints--
|
||||
|
||||
`mergeLists` should be a function.
|
||||
`mergeLists` debe ser una función.
|
||||
|
||||
```js
|
||||
assert(typeof mergeLists == 'function');
|
||||
```
|
||||
|
||||
`mergeLists([[1, 3, 5, 9, 10], [2, 4, 6, 7, 8]])` should return an array.
|
||||
`mergeLists([[1, 3, 5, 9, 10], [2, 4, 6, 7, 8]])` debe retornar un arreglo.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@ -31,7 +31,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
`mergeLists([[1, 3, 5, 9, 10], [2, 4, 6, 7, 8]])` should return `[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]`.
|
||||
`mergeLists([[1, 3, 5, 9, 10], [2, 4, 6, 7, 8]])` debe retornar `[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
@ -43,7 +43,7 @@ assert.deepEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`mergeLists([[1, 4, 7, 10], [2, 5, 8, 11], [3, 6, 9, 12]])` should return `[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]`.
|
||||
`mergeLists([[1, 4, 7, 10], [2, 5, 8, 11], [3, 6, 9, 12]])` debe retornar `[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
@ -56,7 +56,7 @@ assert.deepEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`mergeLists([[1, 3, 9, 14, 15, 17, 28], [7, 8, 14, 14, 23, 26, 28, 29, 30], [9, 23, 25, 29]])` should return `[1, 3, 7, 8, 9, 9, 14, 14, 14, 15, 17, 23, 23, 25, 26, 28, 28, 29, 29, 30]`.
|
||||
`mergeLists([[1, 3, 9, 14, 15, 17, 28], [7, 8, 14, 14, 23, 26, 28, 29, 30], [9, 23, 25, 29]])` debe retornar `[1, 3, 7, 8, 9, 9, 14, 14, 14, 15, 17, 23, 23, 25, 26, 28, 28, 29, 29, 30]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
@ -69,7 +69,7 @@ assert.deepEqual(
|
||||
);
|
||||
```
|
||||
|
||||
`mergeLists([[3, 14, 15], [2, 17, 18], [], [2, 3, 5, 7]])` should return `[2, 2, 3, 3, 5, 7, 14, 15, 17, 18]`.
|
||||
`mergeLists([[3, 14, 15], [2, 17, 18], [], [2, 3, 5, 7]])` debe retornar `[2, 2, 3, 3, 5, 7, 14, 15, 17, 18]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(mergeLists([[3, 14, 15], [2, 17, 18], [], [2, 3, 5, 7]]), [
|
||||
@ -86,7 +86,7 @@ assert.deepEqual(mergeLists([[3, 14, 15], [2, 17, 18], [], [2, 3, 5, 7]]), [
|
||||
]);
|
||||
```
|
||||
|
||||
`mergeLists([[1, 19, 1999], [17, 33, 2999, 3000], [8, 500, 3999]])` should return `[1, 8, 17, 19, 33, 500, 1999, 2999, 3000, 3999]`.
|
||||
`mergeLists([[1, 19, 1999], [17, 33, 2999, 3000], [8, 500, 3999]])` debe retornar `[1, 8, 17, 19, 33, 500, 1999, 2999, 3000, 3999]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(
|
||||
|
Reference in New Issue
Block a user