chore(i18n,learn): processed translations (#45670)

This commit is contained in:
camperbot
2022-04-11 19:34:39 +05:30
committed by GitHub
parent f40a2c6da1
commit 905018ad35
110 changed files with 1846 additions and 210 deletions

View File

@ -11,7 +11,7 @@ dashedName: change-a-variable-for-a-specific-area
Cuando creas tus variables en `:root`, el valor de esa variable quedará establecido para toda la página.
Luego podrás sobreescribir estas variables, configurándolas de nuevo dentro de un elemento específico.
Puedes entonces sobreescribir estas variables configurándolas nuevamente con un selector específico.
# --instructions--
@ -27,7 +27,7 @@ assert(
);
```
La clase `penguin` no debe contener la propiedad `background-color`
La clase `penguin` no debe de tener la propiedad `background-color`.
```js
assert(

View File

@ -11,7 +11,7 @@ dashedName: align-elements-using-the-justify-content-property
Algunas veces los elementos flexibles dentro de un contenedor flexible no llenan todo el espacio del contenedor. Es común querer indicarle al CSS cómo alinear y espaciar los elementos flexibles de una determinada manera. Afortunadamente, la propiedad `justify-content` tiene varias opciones para hacer esto. Pero primero, hay que entender alguna terminología importante antes de revisar dichas opciones.
[Aquí hay una imagen útil que muestra una fila para ilustrar los conceptos siguientes.](https://www.w3.org/TR/css-flexbox-1/images/flex-direction-terms.svg)
[Aquí hay una imagen útil del W3C que ilustra los conceptos siguientes para un contenedor 'row' flex.](https://www.w3.org/TR/css-flexbox-1/images/flex-direction-terms.svg)
Recuerda que establecer un contenedor flexible como fila coloca los elementos flexibles uno al lado del otro de izquierda a derecha. Un contenedor flexible establecido como columna coloca los elementos flexibles apilados verticalmente de arriba a abajo. Para cada uno, la dirección en la que están dispuestos los elementos flexibles se llama el **eje principal**. Para una fila, esta es una línea horizontal que recorta cada elemento. Y para una columna, el eje principal es una línea vertical a través de los elementos.

View File

@ -8,9 +8,9 @@ dashedName: convert-celsius-to-fahrenheit
# --description--
El algoritmo para convertir de Celsius a Fahrenheit es la temperatura en Celsius multiplicado por `9/5`, más `32`.
La fórmula para convertir de Celsius a Fahrenheit es la temperatura en Celsius multiplicado por `9/5`, más `32`.
Se te da una variable `celsius` que representa una temperatura en Celsius. Utiliza la variable `fahrenheit` ya definida y asígnale la temperatura Fahrenheit equivalente a la temperatura Celsius dada. Utiliza el algoritmo mencionado arriba para ayudar a convertir la temperatura en Celsius a Fahrenheit.
Se te da una variable `celsius` que representa una temperatura en Celsius. Utiliza la variable `fahrenheit` ya definida y asígnale la temperatura Fahrenheit equivalente a la temperatura Celsius dada. Utiliza la fórmula mencionada anteriormente para ayudarte a convertir la temperatura Celsius a Fahrenheit.
# --hints--

View File

@ -19,7 +19,7 @@ Ambos devuelven `true`.
# --instructions--
Termina de escribir la función para que devuelva "true" sólo si el objeto pasado contiene los cuatro nombres, `Alan`, `Jeff`, `Sarah` y `Ryan`, y devuelve false de lo contrario.
Termina de escribir la función para que devuelva `true` si el objeto pasado contiene los cuatro nombres, `Alan`, `Jeff`, `Sarah` and `Ryan` y devuelva `false` en caso contrario.
# --hints--

View File

@ -10,7 +10,7 @@ dashedName: remove-items-using-splice
Bien, ya hemos aprendido a eliminar elementos al principio y al final de los arreglos utilizando `shift()` y `pop()`, pero ¿qué pasa si queremos eliminar un elemento de alguna parte del medio? ¿O eliminar más de un elemento a la vez? Pues bien, ahí es donde entra `splice()`. `splice()` nos permite hacer precisamente eso: **eliminar cualquier número de elementos consecutivos** de cualquier parte de un arreglo.
`splice()` puede tomar hasta 3 parámetros, pero por ahora, nos centraremos sólo en los 2 primeros. Los dos primeros parámetros de `splice()` son enteros que representan índices, o posiciones, del arreglo que llama `splice()`. Y recuerda que los arreglos están *indexados en cero*, por lo que para indicar el primer elemento de un arreglo, usaríamos `0`. El primer parámetro de `splice()` representa el índice del arreglo a partir del cual se empiezan a eliminar los elementos, mientras que el segundo parámetro indica el número de elementos a eliminar. Por ejemplo:
`splice()` puede tomar hasta 3 parámetros, pero por ahora, nos centraremos sólo en los 2 primeros. Los primeros dos parámetros de `splice()` son enteros que representan índices, o posiciones, de elementos en el arreglo a la que `splice()` está siendo llamado. Y recuerda que los arreglos están *indexados en cero*, por lo que para indicar el primer elemento de un arreglo, usaríamos `0`. El primer parámetro de `splice()` representa el índice del arreglo a partir del cual se empiezan a eliminar los elementos, mientras que el segundo parámetro indica el número de elementos a eliminar. Por ejemplo:
```js
let array = ['today', 'was', 'not', 'so', 'great'];

View File

@ -19,17 +19,15 @@ Los índices de los arreglos se escriben en la misma notación de corchetes que
```js
const array = [50, 60, 70];
array[0];
console.log(array[0]);
const data = array[1];
```
`array[0]` ahora es `50` y `data` tiene el valor `60`.
**Nota:** No debe haber espacios entre el nombre del arreglo y los corchetes, como `array [0]`. Aunque JavaScript pueda procesar esto correctamente, puedes confundir a otros programadores al leer tu código.
`console.log(array[0])` imprime `50`, y `data` tiene el valor `60`.
# --instructions--
Crea una variable llamada `myData` e iguálala al primer valor de `myArray` usando notación de corchetes.
Crea una variable llamada `myData` y establécela para que sea igual al primer valor de `myArray` usando notación de corchetes.
# --hints--

View File

@ -31,13 +31,13 @@ assert(
);
```
Después de `updateRecords(recordCollection, 5439, "tracks", "Take a Chance on Me")`, `tracks` debe tener la cadena `Take a Chance on Me` como último elemento.
Después `updateRecords(recordCollection, 5439, "tracks", "Take a Chance on Me")`, `tracks` debe de tener la cadena `Take a Chance on Me` como el último y único elemento.
```js
assert(
updateRecords(_recordCollection, 5439, 'tracks', 'Take a Chance on Me')[5439][
'tracks'
].pop() === 'Take a Chance on Me'
updateRecords(_recordCollection, 5439, 'tracks', 'Take a Chance on Me') &&
_recordCollection[5439]['tracks'].length === 1 &&
_recordCollection[5439]['tracks'].pop() === 'Take a Chance on Me'
);
```

View File

@ -9,7 +9,7 @@ dashedName: understanding-uninitialized-variables
# --description--
Cuando las variables de JavaScript son declaradas, tienen un valor inicial de `undefined` (indefinido). Si haces una operación matemática en una variable `undefined`, tu resultado será `NaN` lo que significa <dfn>"Not a Number"</dfn> (no es un número). Si concatenas una cadena con una variable `undefined`, obtendrás una <dfn>cadena</dfn> literal con valor `undefined`.
Cuando las variables de JavaScript son declaradas, tienen un valor inicial de `undefined` (indefinido). Si haces una operación matemática en una variable `undefined`, tu resultado será `NaN` lo que significa <dfn>"Not a Number"</dfn> (no es un número). Si concatenas una cadena con una variable `undefined`, obtendrás una <dfn>cadena</dfn> de `undefined`.
# --instructions--

View File

@ -18,120 +18,123 @@ Recuerda, puedes acceder a las propiedades del objeto mediante la notación de p
# --hints--
`truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex")` debe devolver `true`.
`truthCheck([{name: "Quincy", role: "Founder", isBot: false}, {name: "Naomi", role: "", isBot: false}, {name: "Camperbot", role: "Bot", isBot: true}], "isBot")` debe devolver `false`.
```js
assert.strictEqual(
truthCheck(
[
{ user: 'Tinky-Winky', sex: 'male' },
{ user: 'Dipsy', sex: 'male' },
{ user: 'Laa-Laa', sex: 'female' },
{ user: 'Po', sex: 'female' }
],
'sex'
),
true
);
assert.strictEqual(truthCheck(
[
{ name: "Quincy", role: "Founder", isBot: false },
{ name: "Naomi", role: "", isBot: false },
{ name: "Camperbot", role: "Bot", isBot: true }
],
"isBot"), false);
```
`truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex")` debe devolver `false`.
`truthCheck([{name: "Quincy", role: "Founder", isBot: false}, {name: "Naomi", role: "", isBot: false}, {name: "Camperbot", role: "Bot", isBot: true}], "name")` debe devolver `true`.
```js
assert.strictEqual(
truthCheck(
[
{ user: 'Tinky-Winky', sex: 'male' },
{ user: 'Dipsy' },
{ user: 'Laa-Laa', sex: 'female' },
{ user: 'Po', sex: 'female' }
],
'sex'
),
false
);
assert.strictEqual(truthCheck(
[
{ name: "Quincy", role: "Founder", isBot: false },
{ name: "Naomi", role: "", isBot: false },
{ name: "Camperbot", role: "Bot", isBot: true }
],
"name"), true);
```
`truthCheck([{"user": "Tinky-Winky", "sex": "male", "age": 0}, {"user": "Dipsy", "sex": "male", "age": 3}, {"user": "Laa-Laa", "sex": "female", "age": 5}, {"user": "Po", "sex": "female", "age": 4}], "age")` debe devolver `false`.
`truthCheck([{name: "Quincy", role: "Founder", isBot: false}, {name: "Naomi", role: "", isBot: false}, {name: "Camperbot", role: "Bot", isBot: true}], "role")` debe devolver `false`.
```js
assert.strictEqual(
truthCheck(
[
{ user: 'Tinky-Winky', sex: 'male', age: 2 },
{ user: 'Dipsy', sex: 'male', age: 0 },
{ user: 'Laa-Laa', sex: 'female', age: 5 },
{ user: 'Po', sex: 'female', age: 4 }
],
'age'
),
false
);
assert.strictEqual(truthCheck(
[
{ name: "Quincy", role: "Founder", isBot: false },
{ name: "Naomi", role: "", isBot: false },
{ name: "Camperbot", role: "Bot", isBot: true }
],
"role"), false);
```
`truthCheck([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true}, {"name": "FastForward", "onBoat": null}], "onBoat")` debe devolver `false`.
`truthCheck([{name: "Pikachu", number: 25, caught: 3}, {name: "Togepi", number: 175, caught: 1}], "number")` debe devolver `true`.
```js
assert.strictEqual(
truthCheck(
[
{ name: 'Pete', onBoat: true },
{ name: 'Repeat', onBoat: true },
{ name: 'FastForward', onBoat: null }
],
'onBoat'
),
false
);
assert.strictEqual(truthCheck(
[
{ name: "Pikachu", number: 25, caught: 3 },
{ name: "Togepi", number: 175, caught: 1 },
],
"number"), true);
```
`truthCheck([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true, "alias": "Repete"}, {"name": "FastForward", "onBoat": true}], "onBoat")` debe devolver `true`.
`truthCheck([{name: "Pikachu", number: 25, caught: 3}, {name: "Togepi", number: 175, caught: 1}, {name: "MissingNo", number: NaN, caught: 0}], "caught")` debe devolver `false`.
```js
assert.strictEqual(
truthCheck(
[
{ name: 'Pete', onBoat: true },
{ name: 'Repeat', onBoat: true, alias: 'Repete' },
{ name: 'FastForward', onBoat: true }
],
'onBoat'
),
true
);
assert.strictEqual(truthCheck(
[
{ name: "Pikachu", number: 25, caught: 3 },
{ name: "Togepi", number: 175, caught: 1 },
{ name: "MissingNo", number: NaN, caught: 0 },
],
"caught"), false);
```
`truthCheck([{"single": "yes"}], "single")` debe devolver `true`.
`truthCheck([{name: "Pikachu", number: 25, caught: 3}, {name: "Togepi", number: 175, caught: 1}, {name: "MissingNo", number: NaN, caught: 0}], "number")` debe devolver `false`.
```js
assert.strictEqual(truthCheck([{ single: 'yes' }], 'single'), true);
assert.strictEqual(truthCheck(
[
{ name: "Pikachu", number: 25, caught: 3 },
{ name: "Togepi", number: 175, caught: 1 },
{ name: "MissingNo", number: NaN, caught: 0 },
],
"number"), false);
```
`truthCheck([{"single": ""}, {"single": "double"}], "single")` debe devolver `false`.
`truthCheck([{name: "Quincy", username: "QuincyLarson"}, {name: "Naomi", username: "nhcarrigan"}, {name: "Camperbot"}], "username")` debe devolver `false`.
```js
assert.strictEqual(
truthCheck([{ single: '' }, { single: 'double' }], 'single'),
false
);
assert.strictEqual(truthCheck(
[
{ name: "Quincy", username: "QuincyLarson" },
{ name: "Naomi", username: "nhcarrigan" },
{ name: "Camperbot" }
],
"username"), false);
```
`truthCheck([{"single": "double"}, {"single": undefined}], "single")` debe devolver `false`.
`truthCheck([{name: "freeCodeCamp", users: [{name: "Quincy"}, {name: "Naomi"}]}, {name: "Code Radio", users: [{name: "Camperbot"}]}, {name: "", users: []}], "users")` debe devolver `true`.
```js
assert.strictEqual(
truthCheck([{ single: 'double' }, { single: undefined }], 'single'),
false
);
assert.strictEqual(truthCheck(
[
{ name: "freeCodeCamp", users: [{ name: "Quincy" }, { name: "Naomi" }] },
{ name: "Code Radio", users: [{ name: "Camperbot" }] },
{ name: "", users: [] },
],
"users"), true);
```
`truthCheck([{"single": "double"}, {"single": NaN}], "single")` debe devolver `false`.
`truthCheck([{id: 1, data: {url: "https://freecodecamp.org", name: "freeCodeCamp"}}, {id: 2, data: {url: "https://coderadio.freecodecamp.org/", name: "CodeRadio"}}, {id: null, data: {}}], "data")` debe devolver `true`.
```js
assert.strictEqual(
truthCheck([{ single: 'double' }, { single: NaN }], 'single'),
false
);
assert.strictEqual(truthCheck(
[
{ id: 1, data: { url: "https://www.freecodecamp.org", name: "freeCodeCamp" } },
{ id: 2, data: { url: "https://coderadio.freecodecamp.org/", name: "CodeRadio" } },
{ id: null, data: {} },
],
"data"), true);
```
`truthCheck([{id: 1, data: {url: "https://freecodecamp.org", name: "freeCodeCamp"}}, {id: 2, data: {url: "https://coderadio.freecodecamp.org/", name: "CodeRadio"}}, {id: null, data: {}}], "id")` debe devolver `false`.
```js
assert.strictEqual(truthCheck(
[
{ id: 1, data: { url: "https://www.freecodecamp.org", name: "freeCodeCamp" } },
{ id: 2, data: { url: "https://coderadio.freecodecamp.org/", name: "CodeRadio" } },
{ id: null, data: {} },
],
"id"), false);
```
# --seed--
@ -143,7 +146,7 @@ function truthCheck(collection, pre) {
return pre;
}
truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
truthCheck([{name: "Quincy", role: "Founder", isBot: false}, {name: "Naomi", role: "", isBot: false}, {name: "Camperbot", role: "Bot", isBot: true}], "isBot");
```
# --solutions--

View File

@ -9,9 +9,9 @@ dashedName: align-elements-using-the-justify-content-property
# --description--
Certe volte gli oggetti flex all'interno di un contenitore flex non riempiono tutto lo spazio del contenitore. È comune voler dire a CSS di allineare e spaziare gli elementi flex in una certa maniera. Fortunatamente, la proprietà `justify-content` ha diverse opzioni per farlo. Ma prima, c'è un pò di terminologia importante da comprendere prima di rivedere queste opzioni.
Certe volte gli oggetti flex all'interno di un contenitore flex non riempiono tutto lo spazio del contenitore. È comune voler dire a CSS di allineare e spaziare gli elementi flex in una certa maniera. Fortunatamente, la proprietà `justify-content` ha diverse opzioni per farlo. Ma prima, c'è un po' di terminologia importante da capire prima di rivedere queste opzioni.
[Ecco un'immagine molto utile che mostra una riga per illustrare i concetti qui sotto.](https://www.w3.org/TR/css-flexbox-1/images/flex-direction-terms.svg)
[Ecco una immagine utile da W3C che illustra i concetti sotto per un contenitore 'row' (riga) flex.](https://www.w3.org/TR/css-flexbox-1/images/flex-direction-terms.svg)
Ricorda che l'impostazione di un contenitore flex come riga posiziona gli elementi flex fianco a fianco da sinistra a destra. Un contenitore flex impostato come colonna piazza gli oggetti flex in una pila verticale dall'alto verso il basso. Per ognuno, la direzione in cui sono disposti gli elementi flex è chiamata **asse principale**. Per una riga, si tratta di una linea orizzontale che taglia ogni elemento. E per una colonna, l'asse principale è una linea verticale attraverso gli elementi.

View File

@ -25,11 +25,9 @@ const data = array[1];
`console.log(array[0])` scrive `50`, e `data` ha il valore `60`.
**Nota:** Non ci dovrebbero essere spazi tra il nome dell'array e le parentesi quadre, come in `array [0]`. Anche se JavaScript è in grado di elaborarlo correttamente, questo potrebbe confondere altri programmatori che leggono il tuo codice.
# --instructions--
Crea una variabile chiamata `myData` e impostala al primo valore di `myArray` usando la notazione a parentesi.
Crea una variabile chiamata `myData` e imponila uguale al primo valore di `myArray` usando la notazione a parentesi quadre.
# --hints--
@ -51,7 +49,7 @@ assert(
);
```
Si dovrebbe accedere ai dati nella variabile `myArray` utilizzando la notazione a parentesi.
Dovresti accedere ai dati nella variabile `myArray` usando la notazione a parentesi quadre.
```js
assert(

View File

@ -15,7 +15,7 @@ Puoi trovare la lunghezza di un valore `String` scrivendo `.length` dopo la vari
console.log("Alan Peter".length);
```
Il valore `10` sarà visualizzato nella console.
Il valore `10` sarà visualizzato nella console. Nota che è contato anche il carattere spazio tra "Alan" e "Peter".
Ad esempio, se avessimo creato una variabile `const firstName = "Ada"`, potremmo scoprire quanto è lunga la stringa `Ada` utilizzando la proprietà `firstName.length`.

View File

@ -0,0 +1,68 @@
---
id: 61329d52e5010e08d9b9d66b
title: Step 4
challengeType: 0
dashedName: step-4
---
# --description--
Un altro elemento `meta` importante per l'accessibilità e la SEO è la definizione `description`. Il valore dell'attributo `content` è usato dai motori di ricerca per dare una descrizione della tua pagina.
Aggiungi un elemento `meta` con l'attributo `name` impostato a `description`, e dagli un attributo `content` utile.
# --hints--
Dovresti aggiungere un nuovo elemento `meta` a `head`.
```js
assert.equal(document.querySelectorAll('meta').length, 3);
```
Dovresti dare a `meta` un attributo `name` con valore di `description`.
```js
assert.exists(document.querySelector('meta[name="description"]'));
```
Dovresti dare a `meta` un attributo `content`.
```js
assert.notEmpty(document.querySelector('meta[name="description"]')?.content);
```
Il valore dell'attributo `content` non deve superare una lunghezza di 165 caratteri. _Questa è la lunghezza massima della descrizione permessa da Google._
```js
assert.isAtMost(document.querySelector('meta[name="description"]')?.content?.length, 165);
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
--fcc-editable-region--
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="styles.css" />
</head>
--fcc-editable-region--
<body>
</body>
</html>
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
```

View File

@ -0,0 +1,63 @@
---
id: 6133acc353338c0bba9cb553
title: Step 5
challengeType: 0
dashedName: step-5
---
# --description--
Infine, nell'elemento `head`, l'elemento `title` è utile ai lettori di schermi per capire il contenuto di una pagina. Inoltre, è una parte importante della _SEO_.
Assegna alla tua pagina un `title` che sia descrittivo e conciso.
# --hints--
Dovresti aggiungere un elemento `title` dentro `head`.
```js
assert.exists(document.querySelector('head > title'));
```
Non dovresti avere un `title` più lungo di 60 caratteri.
```js
assert.isAtMost(document.querySelector('head > title')?.textContent?.length, 60);
```
Cerca di essere più descrittivo con il tuo elemento `title`. _Suggerimento: Almeno 15 caratteri_
```js
assert.isAtLeast(document.querySelector('head > title')?.textContent?.length, 15);
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
--fcc-editable-region--
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
<link rel="stylesheet" href="styles.css" />
</head>
--fcc-editable-region--
<body>
</body>
</html>
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
```

View File

@ -0,0 +1,68 @@
---
id: 6133d11ef548f51f876149e3
title: Step 6
challengeType: 0
dashedName: step-6
---
# --description--
La navigazione è una parte fondamentale dell'accessibilità, e i lettori dello schermo si affidano a te per dare struttura alla pagina. Ciò viene realizzato con elementi HTML semantici.
Aggiungi un elemento `header` e un elemento `main` alla tua pagina.
L'elemento `header` verrà utilizzato per introdurre la pagina, oltre a fornire un menù di navigazione.
L'elemento `main` conterrà il contenuto principale della tua pagina.
# --hints--
Dovresti aggiungere un elemento `header` dentro `body`.
```js
assert.exists(document.querySelector('body > header'));
```
Dovresti aggiungere un elemento `main` dentro `body`.
```js
assert.exists(document.querySelector('body > main'));
```
L'elemento `header` dovrebbe precedere l'elemento `main`.
```js
assert.exists(document.querySelector('header + main'));
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
<title>Accessibility Quiz</title>
<link rel="stylesheet" href="styles.css" />
</head>
--fcc-editable-region--
<body>
</body>
--fcc-editable-region--
</html>
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
```

View File

@ -0,0 +1,93 @@
---
id: 613e2546d0594208229ada50
title: Step 7
challengeType: 0
dashedName: step-7
---
# --description--
All'interno dell'elemento `header`, provedi del contesto per la pagina annidando un elemento `img`, `h1`, e `nav`.
L'`img` dovrebbe puntare al link `https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg` e avere un `id` di `logo`.
L'elemento `h1` dovrebbe contenere il testo `HTML/CSS Quiz`.
# --hints--
Dovresti aggiungere un elemento `img` all'elemento `header`.
```js
assert.exists(document.querySelector('header > img'));
```
Dovresti aggiungere un elemento `h1` all'elemento `header`.
```js
assert.exists(document.querySelector('header > h1'));
```
Dovresti aggiungere un elemento `nav` all'elemento `header`.
```js
assert.exists(document.querySelector('header > nav'));
```
Dovresti posizionare gli elementi `img`, `h1` e `nav` in questo ordine.
```js
assert.exists(document.querySelector('img + h1 + nav'));
```
Dovresti dare all'elemento `img` un attributo `src` di `https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg`.
```js
assert.equal(document.querySelector('img')?.src, 'https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg');
```
Dovresti dare all'elemento `img` un attributo `id` di `logo`.
```js
assert.equal(document.querySelector('img')?.id, 'logo');
```
Dovresti dare all'elemento `h1` il testo `HTML/CSS Quiz`.
```js
assert.include(document.querySelector('h1')?.innerText?.toLowerCase(), 'html/css quiz');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
<title>Accessibility Quiz</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
--fcc-editable-region--
<header>
</header>
--fcc-editable-region--
<main></main>
</body>
</html>
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
```

View File

@ -0,0 +1,66 @@
---
id: 613e275749ebd008e74bb62e
title: Step 8
challengeType: 0
dashedName: step-8
---
# --description--
Una proprietà utile di un _SVG_ (scalable vector graphics - grafica vettoriale scalabile) è che contiene un attributo `path` che permette di scalare l'immagine senza influenzare la risoluzione dell'immagine risultante.
Attualmente, l'elemento `img` sta assumendo la sua dimensione predefinita, che è troppo grande. Ridimensiona l'immagine correttamente usando il suo `id` come selettore e impostando `width` a `max(100px, 18vw)`.
# --hints--
Dovresti usare il selettore `#logo` per selezionare l'elemento `img`.
```js
assert.exists(new __helpers.CSSHelp(document).getStyle('#logo'));
```
Dovresti dare a `img` un `width` di `max(100px, 18vw)`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('#logo')?.width, 'max(100px, 18vw)');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
<title>Accessibility Quiz</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<header>
<img id="logo" src="https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg">
<h1>HTML/CSS Quiz</h1>
<nav></nav>
</header>
<main></main>
</body>
</html>
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
--fcc-editable-region--
--fcc-editable-region--
```

View File

@ -0,0 +1,83 @@
---
id: 61408e4ae3e35d08feb260eb
title: Step 11
challengeType: 0
dashedName: step-11
---
# --description--
Cambia il colore del font di `h1` a `#f1be32`, e imposta la dimensione del font a `min(5vw, 1.2em)`.
# --hints--
Dovresti usare il selettore di elemento `h1`.
```js
assert.exists(new __helpers.CSSHelp(document).getStyle('h1'));
```
Dovresti dare a `h1` un `color` di `#f1be32`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('h1')?.color, 'rgb(241, 190, 50)');
```
Dovresti dare a `h1` un `font-size` di `min(5vw, 1.2em)`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('h1')?.fontSize, 'min(5vw, 1.2em)');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
<title>Accessibility Quiz</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<header>
<img id="logo" src="https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg">
<h1>HTML/CSS Quiz</h1>
<nav></nav>
</header>
<main></main>
</body>
</html>
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
header {
width: 100%;
height: 50px;
background-color: #1b1b32;
display: flex;
}
#logo {
width: max(100px, 18vw);
background-color: #0a0a23;
aspect-ratio: 35 / 4;
padding: 0.4rem;
}
--fcc-editable-region--
--fcc-editable-region--
```

View File

@ -0,0 +1,112 @@
---
id: 61408f155e798909b6908712
title: Step 12
challengeType: 0
dashedName: step-12
---
# --description--
Per abilitare la navigazione sulla pagina, aggiungi un elenco puntato con i tre seguenti elementi:
- `INFO`
- `HTML`
- `CSS`
Il testo degli elementi della lista dovrebbe essere racchiuso in tag ancora.
# --hints--
Dovresti annidare un elemento `ul` dentro `nav`.
```js
assert.equal(document.querySelectorAll('nav > ul')?.length, 1);
```
Dovresti annidare tre elementi `li` dentro l'elemento `ul`.
```js
assert.equal(document.querySelectorAll('nav > ul > li')?.length, 3);
```
Dovresti annidare un elemento `a` dentro ogni elemento `li`.
```js
assert.equal(document.querySelectorAll('nav > ul > li > a')?.length, 3);
```
Dovresti dare al tuo primo elemento `a` il testo `INFO`.
```js
assert.equal(document.querySelectorAll('nav > ul > li > a')?.[0]?.textContent, 'INFO');
```
Dovresti dare al tuo secondo elemento `a` il testo `HTML`.
```js
assert.equal(document.querySelectorAll('nav > ul > li > a')?.[1]?.textContent, 'HTML');
```
Dovresti dare al tuo terzo elemento `a` un testo `CSS`.
```js
assert.equal(document.querySelectorAll('nav > ul > li > a')?.[2]?.textContent, 'CSS');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
<title>Accessibility Quiz</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<header>
<img id="logo" src="https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg">
<h1>HTML/CSS Quiz</h1>
--fcc-editable-region--
<nav>
</nav>
--fcc-editable-region--
</header>
<main></main>
</body>
</html>
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
header {
width: 100%;
height: 50px;
background-color: #1b1b32;
display: flex;
}
#logo {
width: max(100px, 18vw);
background-color: #0a0a23;
aspect-ratio: 35 / 4;
padding: 0.4rem;
}
h1 {
color: #f1be32;
font-size: min(5vw, 1.2em);
}
```

View File

@ -0,0 +1,125 @@
---
id: 61435e3c0679a306c20f1acc
title: Step 18
challengeType: 0
dashedName: step-18
---
# --description--
Per poter navigare dentro la pagina, dai ad ogni elemento ancora un `href` corrispondente all'`id` degli elementi `h2`.
# --hints--
Dovresti dare al primo elemento `a` un `href` di `#student-info`.
```js
assert.equal(document.querySelectorAll('a')?.[0]?.getAttribute('href'), '#student-info');
```
Dovresti dare al tuo secondo elemento `a` un `href` di `#html-questions`.
```js
assert.equal(document.querySelectorAll('a')?.[1]?.getAttribute('href'), '#html-questions');
```
Dovresti dare al tuo terzo elemento `a` un `href` di `#css-questions`.
```js
assert.equal(document.querySelectorAll('a')?.[2]?.getAttribute('href'), '#css-questions');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
<title>Accessibility Quiz</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<header>
<img id="logo" src="https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg">
<h1>HTML/CSS Quiz</h1>
<nav>
--fcc-editable-region--
<ul>
<li><a>INFO</a></li>
<li><a>HTML</a></li>
<li><a>CSS</a></li>
</ul>
--fcc-editable-region--
</nav>
</header>
<main>
<form method="post" action="https://freecodecamp.org/practice-project/accessibility-quiz">
<section role="region" aria-labelledby="student-info">
<h2 id="student-info">Student Info</h2>
</section>
<section role="region" aria-labelledby="html-questions">
<h2 id="html-questions">HTML</h2>
</section>
<section role="region" aria-labelledby="css-questions">
<h2 id="css-questions">CSS</h2>
</section>
</form>
</main>
</body>
</html>
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
header {
width: 100%;
height: 50px;
background-color: #1b1b32;
display: flex;
}
#logo {
width: max(100px, 18vw);
background-color: #0a0a23;
aspect-ratio: 35 / 4;
padding: 0.4rem;
}
h1 {
color: #f1be32;
font-size: min(5vw, 1.2em);
}
nav {
width: 50%;
max-width: 300px;
height: 50px;
}
nav > ul {
display: flex;
justify-content: space-evenly;
}
h1,
h2 {
font-family: Verdana, Tahoma;
}
h2 {
border-bottom: 4px solid #dfdfe2;
}
```

View File

@ -0,0 +1,261 @@
---
id: 61487b77d4a37707073a64e5
title: Step 48
challengeType: 0
dashedName: step-48
---
# --description--
Quando la larghezza dello schermo è piccola, l'elemento `h1` non si mette su più righe come dovrebbe. Allinea al centro il testo di `h1`.
Poi, dai a `main` un padding che renda completamente visibile l'intestazione di sezione `Student Info`.
# --hints--
Dovresti dare ad `h1` un `text-align` di `center`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('h1')?.textAlign, 'center');
```
Dovresti aggiungere un selettore `main` per selezionare l'elemento `main`.
```js
assert.exists(new __helpers.CSSHelp(document).getStyle('main'));
```
Dovresti dare a `main` un `padding-top` di almeno `25px`.
```js
assert.isAtLeast(Number(new __helpers.CSSHelp(document).getStyle('main')?.paddingTop?.replace(/\D+/, '')), 25);
```
Dovresti cambiare solo il valore di `padding-top`.
```js
assert.isEmpty(new __helpers.CSSHelp(document).getStyle('main')?.paddingBottom);
assert.isEmpty(new __helpers.CSSHelp(document).getStyle('main')?.paddingLeft);
assert.isEmpty(new __helpers.CSSHelp(document).getStyle('main')?.paddingRight);
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
<title>Accessibility Quiz</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<header>
<img id="logo" src="https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg">
<h1>HTML/CSS Quiz</h1>
<nav>
<ul>
<li><a href="#student-info">INFO</a></li>
<li><a href="#html-questions">HTML</a></li>
<li><a href="#css-questions">CSS</a></li>
</ul>
</nav>
</header>
<main>
<form method="post" action="https://freecodecamp.org/practice-project/accessibility-quiz">
<section role="region" aria-labelledby="student-info">
<h2 id="student-info">Student Info</h2>
<div class="info">
<label for="student-name">Name:</label>
<input type="text" name="student-name" id="student-name" />
</div>
<div class="info">
<label for="student-email">Email:</label>
<input type="email" name="student-email" id="student-email" />
</div>
<div class="info">
<label for="birth-date">D.O.B.<span class="sr-only">(Date of Birth)</span></label>
<input type="date" name="birth-date" id="birth-date" />
</div>
</section>
<section role="region" aria-labelledby="html-questions">
<h2 id="html-questions">HTML</h2>
<div class="question-block">
<p>1</p>
<fieldset class="question" name="html-question-one">
<legend>
The legend element represents a caption for the content of its
parent fieldset element
</legend>
<ul class="answers-list">
<li>
<label for="q1-a1">
<input type="radio" id="q1-a1" name="q1" value="true" />
True
</label>
</li>
<li>
<label for="q1-a2">
<input type="radio" id="q1-a2" name="q1" value="false" />
False
</label>
</li>
</ul>
</fieldset>
</div>
<div class="question-block">
<p>2</p>
<fieldset class="question" name="html-question-two">
<legend>
A label element nesting an input element is required to have a
for attribute with the same value as the input's id
</legend>
<ul class="answers-list">
<li>
<label for="q2-a1">
<input type="radio" id="q2-a1" name="q2" value="true" />
True
</label>
</li>
<li>
<label for="q2-a2">
<input type="radio" id="q2-a2" name="q2" value="false" />
False
</label>
</li>
</ul>
</fieldset>
</div>
</section>
<section role="region" aria-labelledby="css-questions">
<h2 id="css-questions">CSS</h2>
<div class="formrow">
<div class="question-block">
<label for="customer">Are you a frontend developer?</label>
</div>
<div class="answer">
<select name="customer" id="customer" required>
<option value="">Select an option</option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
</div>
<div class="question-block">
<label for="css-questions">Do you have any questions:</label>
</div>
<div class="answer">
<textarea id="css-questions" name="css-questions" rows="5" cols="24" placeholder="Who is flexbox..."></textarea>
</div>
</div>
</section>
<button type="submit">Submit</button>
</form>
</main>
<footer>
<address>
<a href="https://freecodecamp.org">freeCodeCamp</a><br />
San Francisco<br />
California<br />
USA
</address>
</footer>
</body>
</html>
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
header {
width: 100%;
height: 50px;
background-color: #1b1b32;
display: flex;
justify-content: space-between;
align-items: center;
position: fixed;
top: 0;
}
#logo {
width: max(100px, 18vw);
background-color: #0a0a23;
aspect-ratio: 35 / 4;
padding: 0.4rem;
}
--fcc-editable-region--
h1 {
color: #f1be32;
font-size: min(5vw, 1.2em);
}
--fcc-editable-region--
nav {
width: 50%;
max-width: 300px;
height: 50px;
}
nav > ul {
display: flex;
justify-content: space-evenly;
}
nav > ul > li {
color: #dfdfe2;
margin: 0 0.2rem;
padding: 0.2rem;
display: block;
}
nav > ul > li:hover {
background-color: #dfdfe2;
color: #1b1b32;
cursor: pointer;
}
li > a {
color: inherit;
text-decoration: none;
}
h1,
h2 {
font-family: Verdana, Tahoma;
}
h2 {
border-bottom: 4px solid #dfdfe2;
}
p::before {
content: "Question #";
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```

View File

@ -0,0 +1,275 @@
---
id: 61487da611a65307e78d2c20
title: Step 49
challengeType: 0
dashedName: step-49
---
# --description--
Su schermi piccoli, l'elenco puntato nella barra di navigazione va oltre il lato destro dello schermo.
Sistemalo usando _Flexbox_ per portare su più righe il contenuto di `ul`. Poi, imposta le seguenti proprietà CSS per allineare correttamente il testo:
```css
align-items: center;
padding-inline-start: 0;
margin-block: 0;
height: 100%;
```
# --hints--
Dovresti dare a `ul` un `flex-wrap` di `wrap`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('nav > ul')?.flexWrap, 'wrap');
```
Dovresti dare a `ul` un `align-items` di `center`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('nav > ul')?.alignItems, 'center');
```
Dovresti dare a `ul` un `padding-inline-start` di `0`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('nav > ul')?.paddingInlineStart, '0px');
```
Dovresti dare a `ul` un `margin-block` di `0`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('nav > ul')?.marginBlock, '0px');
```
Dovresti dare a `ul` un `height` di `100%`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('nav > ul')?.height, '100%');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
<title>Accessibility Quiz</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<header>
<img id="logo" src="https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg">
<h1>HTML/CSS Quiz</h1>
<nav>
<ul>
<li><a href="#student-info">INFO</a></li>
<li><a href="#html-questions">HTML</a></li>
<li><a href="#css-questions">CSS</a></li>
</ul>
</nav>
</header>
<main>
<form method="post" action="https://freecodecamp.org/practice-project/accessibility-quiz">
<section role="region" aria-labelledby="student-info">
<h2 id="student-info">Student Info</h2>
<div class="info">
<label for="student-name">Name:</label>
<input type="text" name="student-name" id="student-name" />
</div>
<div class="info">
<label for="student-email">Email:</label>
<input type="email" name="student-email" id="student-email" />
</div>
<div class="info">
<label for="birth-date">D.O.B.<span class="sr-only">(Date of Birth)</span></label>
<input type="date" name="birth-date" id="birth-date" />
</div>
</section>
<section role="region" aria-labelledby="html-questions">
<h2 id="html-questions">HTML</h2>
<div class="question-block">
<p>1</p>
<fieldset class="question" name="html-question-one">
<legend>
The legend element represents a caption for the content of its
parent fieldset element
</legend>
<ul class="answers-list">
<li>
<label for="q1-a1">
<input type="radio" id="q1-a1" name="q1" value="true" />
True
</label>
</li>
<li>
<label for="q1-a2">
<input type="radio" id="q1-a2" name="q1" value="false" />
False
</label>
</li>
</ul>
</fieldset>
</div>
<div class="question-block">
<p>2</p>
<fieldset class="question" name="html-question-two">
<legend>
A label element nesting an input element is required to have a
for attribute with the same value as the input's id
</legend>
<ul class="answers-list">
<li>
<label for="q2-a1">
<input type="radio" id="q2-a1" name="q2" value="true" />
True
</label>
</li>
<li>
<label for="q2-a2">
<input type="radio" id="q2-a2" name="q2" value="false" />
False
</label>
</li>
</ul>
</fieldset>
</div>
</section>
<section role="region" aria-labelledby="css-questions">
<h2 id="css-questions">CSS</h2>
<div class="formrow">
<div class="question-block">
<label for="customer">Are you a frontend developer?</label>
</div>
<div class="answer">
<select name="customer" id="customer" required>
<option value="">Select an option</option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
</div>
<div class="question-block">
<label for="css-questions">Do you have any questions:</label>
</div>
<div class="answer">
<textarea id="css-questions" name="css-questions" rows="5" cols="24" placeholder="Who is flexbox..."></textarea>
</div>
</div>
</section>
<button type="submit">Submit</button>
</form>
</main>
<footer>
<address>
<a href="https://freecodecamp.org">freeCodeCamp</a><br />
San Francisco<br />
California<br />
USA
</address>
</footer>
</body>
</html>
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
header {
width: 100%;
height: 50px;
background-color: #1b1b32;
display: flex;
justify-content: space-between;
align-items: center;
position: fixed;
top: 0;
}
#logo {
width: max(100px, 18vw);
background-color: #0a0a23;
aspect-ratio: 35 / 4;
padding: 0.4rem;
}
h1 {
color: #f1be32;
font-size: min(5vw, 1.2em);
text-align: center;
}
nav {
width: 50%;
max-width: 300px;
height: 50px;
}
--fcc-editable-region--
nav > ul {
display: flex;
justify-content: space-evenly;
}
--fcc-editable-region--
nav > ul > li {
color: #dfdfe2;
margin: 0 0.2rem;
padding: 0.2rem;
display: block;
}
nav > ul > li:hover {
background-color: #dfdfe2;
color: #1b1b32;
cursor: pointer;
}
li > a {
color: inherit;
text-decoration: none;
}
main {
padding-top: 50px;
}
h1,
h2 {
font-family: Verdana, Tahoma;
}
h2 {
border-bottom: 4px solid #dfdfe2;
}
p::before {
content: "Question #";
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```

View File

@ -0,0 +1,50 @@
---
id: 614ccc21ea91ef1736b9b578
title: Step 1
challengeType: 0
dashedName: step-1
---
# --description--
Benvenuto alla prima parte del Quiz sull'Accessibilità. Adesso che stai diventando uno sviluppatore esperto di HTML e CSS, abbiamo già scritto il boilerplate base.
Inizia questo viaggio nell'accessibilità fornendo un attributo `lang` al tuo elemento `html`. Questo aiuterà i lettori di schermo a identificare la lingua della pagina.
# --hints--
Dovresti dare all'elemento `html` un attributo `lang`. _Suggerimento: Puoi usare il valore `en` per l'inglese._
```js
assert.match(code, /<html\s+lang=('|")[\w\-]+?\1\s*>/i);
// TODO: This should/could be fixed in the builder.js
// assert.notThrow(Intl.getCanonicalLocales(document.querySelector('html').lang));
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
--fcc-editable-region--
<html>
<head>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
</body>
</html>
--fcc-editable-region--
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
```

View File

@ -1,6 +1,6 @@
---
id: 613297a923965e0703b64796
title: Etapa 2
title: Passo 2
challengeType: 0
dashedName: step-2
---

View File

@ -1,6 +1,6 @@
---
id: 61329b210dac0b08047fd6ab
title: Etapa 3
title: Passo 3
challengeType: 0
dashedName: step-3
---

View File

@ -1,6 +1,6 @@
---
id: 61329d52e5010e08d9b9d66b
title: Etapa 4
title: Passo 4
challengeType: 0
dashedName: step-4
---

View File

@ -1,6 +1,6 @@
---
id: 6133acc353338c0bba9cb553
title: Etapa 5
title: Passo 5
challengeType: 0
dashedName: step-5
---

View File

@ -0,0 +1,68 @@
---
id: 6133d11ef548f51f876149e3
title: Passo 6
challengeType: 0
dashedName: step-6
---
# --description--
A navegação é uma parte fundamental da acessibilidade. Os leitores de tela dependem de você para fornecer a estrutura de sua página. Isso é feito com elementos HTML semânticos.
Adicione um elemento `header` e um elemento `main` à sua página.
O elemento `header` será usado para introduzir a página, bem como fornecer um menu de navegação.
O elemento `main` contém o conteúdo principal de sua página.
# --hints--
Você deve adicionar um elemento `header` ao `body`.
```js
assert.exists(document.querySelector('body > header'));
```
Você deve adicionar um novo elemento `main` ao `body`.
```js
assert.exists(document.querySelector('body > main'));
```
O elemento `header` deve vir antes do elemento `main`.
```js
assert.exists(document.querySelector('header + main'));
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
<title>Accessibility Quiz</title>
<link rel="stylesheet" href="styles.css" />
</head>
--fcc-editable-region--
<body>
</body>
--fcc-editable-region--
</html>
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
```

View File

@ -0,0 +1,93 @@
---
id: 613e2546d0594208229ada50
title: Passo 7
challengeType: 0
dashedName: step-7
---
# --description--
No `header`, forneça um contexto sobre a página, aninhando um elemento `img`, um `h1` e um `nav`.
A `img` deve apontar para `https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg` e ter no `id` o valor `logo`.
O `h1` deve conter o texto `HTML/CSS Quiz`.
# --hints--
Você deve adicionar um elemento `img` ao elemento `header`.
```js
assert.exists(document.querySelector('header > img'));
```
Você deve adicionar um elemento `h1` ao elemento `header`.
```js
assert.exists(document.querySelector('header > h1'));
```
Você deve adicionar um elemento `nav` ao elemento `header`.
```js
assert.exists(document.querySelector('header > nav'));
```
Você deve colocar os elementos `img`, `h1` e `nav` nessa ordem.
```js
assert.exists(document.querySelector('img + h1 + nav'));
```
Você deve dar ao elemento `img` um atributo `src` equivalente a `https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg`.
```js
assert.equal(document.querySelector('img')?.src, 'https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg');
```
Você deve dar ao elemento `img` um atributo `id` equivalente a `logo`.
```js
assert.equal(document.querySelector('img')?.id, 'logo');
```
Você deve atribuir ao elemento `h1` o texto `HTML/CSS Quiz`.
```js
assert.include(document.querySelector('h1')?.innerText?.toLowerCase(), 'html/css quiz');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
<title>Accessibility Quiz</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
--fcc-editable-region--
<header>
</header>
--fcc-editable-region--
<main></main>
</body>
</html>
```
```css
body {
background: #f5f6f7;
color: #1b1b32;
font-family: Helvetica;
margin: 0;
}
```

View File

@ -1,6 +1,6 @@
---
id: 614ccc21ea91ef1736b9b578
title: Etapa 1
title: Passo 1
challengeType: 0
dashedName: step-1
---

View File

@ -11,7 +11,9 @@ dashedName: set-the-font-size-for-multiple-heading-elements
Властивість `font-size` використовується для визначення розміру тексту в заданому елементі. Це правило можна застосовувати для кількох елементів, щоб створити візуальну узгодженість тексту на сторінці. У цьому завданні ви встановите значення для всіх `h1` по `h6` тегів, щоб вирівняти розмір заголовків.
# --instructions-- <p>У тегах <code>style</code>, встановіть <code>font-size</code> у:</p>
# --instructions--
<p>У тегах <code>style</code>, встановіть <code>font-size</code> у:</p>
<ul>
<li>Тег <code>h1</code> до 68px.</li>

View File

@ -14,7 +14,7 @@ dashedName: positive-and-negative-lookahead
Позитивне передбачення шукатиме, щоб переконатися, що елемент у шаблоні пошуку є, але насправді не відповідатиме йому. Позитивне передбачення використовується як `(?=...)`, де `...` необхідна частина, яка не збігається.
З іншого боку, негативне передбачення буде стежити за тим, щоб елемент в зразку пошуку був відсутній. Негативне передбачення використовується як `(?=...)`, де `...` необхідний шаблон, який не збігається. Решта шаблону повертається, якщо немає негативного передбачення.
З іншого боку, негативне передбачення буде стежити за тим, щоб елемент в зразку пошуку був відсутній. Негативний огляд використовується як `(?!...)`, де `...` необхідний шаблон, який не збігається. Решта шаблону повертається, якщо немає негативного передбачення.
Lookaheads є трохи заплутаними, але деякі приклади допоможуть вам в цьому.

View File

@ -20,7 +20,9 @@ dashedName: problem-101-optimum-polynomial
Звідси отримуємо такі оптимальні многочлени для кубічної послідовності:
$$\begin{array}{ll} OP(1, n) = 1 & 1, {\color{red}1}, 1, 1, \ldots \\\\ OP(2, n) = 7n6 & 1, 8, {\color{red}{15}}, \ldots \\\\ OP(3, n) = 6n^211n+6 & 1, 8, 27, {\color{red}{58}}, \ldots \\\\ OP(4, n) = n^3 & 1, 8, 27, 64, 125, \ldots \end{array}$$
$$\begin{array}{ll} OP(1, n) = 1 & 1, {\color{red}1}, 1, 1, \ldots \\\\
OP(2, n) = 7n6 & 1, 8, {\color{red}{15}}, \ldots \\\\ OP(3, n) = 6n^211n+6 & 1, 8, 27, {\color{red}{58}}, \ldots \\\\
OP(4, n) = n^3 & 1, 8, 27, 64, 125, \ldots \end{array}$$
Очевидно, не існує BOP для k ≥ 4. Враховуючи суму перших неправильних членів, створених поганими оптимальними многочленами (зазначені у $\color{red}{red}$ вище), отримуємо 1 + 15 + 58 = 74. Розгляньмо твірну функцію для многочлена десятого степеня:

View File

@ -15,7 +15,10 @@ dashedName: problem-103-special-subset-sums-optimum
Якщо $S(A)$ обмежене даним n, назвемо його оптимальним набором особливих сум. Перші п'ять оптимальних особливих сум наведені нижче.
$\begin{align} & n = 1: \\{1\\} \\\\ & n = 2: \\{1, 2\\} \\ & n = 3: \\{2, 3, 3, 4\\} \\\\ & n = 4: \\{3, 5, 6, 7\\} \\\\ & n = 5: \\{6, 9, 11, 12, 13\\} \\\\ \end{align}$$
$\begin{align} & n = 1: \\{1\\} \\\\
& n = 2: \\{1, 2\\} \\ & n = 3: \\{2, 3, 3, 4\\} \\\\
& n = 4: \\{3, 5, 6, 7\\} \\\\ & n = 5: \\{6, 9, 11, 12, 13\\} \\\\
\end{align}$$
Здається, що для даного оптимального набору $A = \\{a_1, a_2, \ldots, a_n\\}$, наступний оптимальний набір у вигляді $B = \\{b, a_1 + b, a_2 + b, \ldots, a_n + b\\}$, де b - середній елемент з попереднього рядка.

View File

@ -14,7 +14,9 @@ $$\frac{1}{x} + \frac{{1}{y} = \frac{1}{n}$$
Для `n` = 4 існує три різних рішення:
$$\begin{align} & \frac{1}{5} + \frac{1}{20} = \frac{1}{4}\\\\ \\\\ & \frac{1}{6} + \frac{1}{12} = \frac{1}{4}\\\\ \\\\ & \frac{1}{8} + \frac{1}{8} = \frac{1}{4} \end{align}$$
$$\begin{align} & \frac{1}{5} + \frac{1}{20} = \frac{1}{4}\\\\
\\\\ & \frac{1}{6} + \frac{1}{12} = \frac{1}{4}\\\\
\\\\ & \frac{1}{8} + \frac{1}{8} = \frac{1}{4} \end{align}$$
Яке найменше значення `n`, для якого кількість рішень перевищує тисячу?

View File

@ -20,7 +20,12 @@ dashedName: problem-109-darts
"Чекаут" коли гравець може завершити гру при поточному рахунку; найвищий чекаут 170: T20 T25 D25 (два попадання у потрійне 20 та в яблучко). Існує одинадцять різних варіантів чекауту при рахунку 6:
$$\початок{array} \text{D3} & & \\\\ D1 & D2 & \\\\ S2 & D2 & \\\\ D2 & D1 & \\\\ S4 & D1 & \\\\ S1 & S1 & D2 \\\\ S1 & T1 & D1 \\\\ S1 & S3 & D1 \\\\ D1 & D1 & D1 \\\\ D1 & S2 & D1 \\\\ S2 & S2 & D1 \кінець{array}$$
$$\початок{array} \text{D3} & & \\\\
D1 & D2 & \\\\ S2 & D2 & \\\\
D2 & D1 & \\\\ S4 & D1 & \\\\
S1 & S1 & D2 \\\\ S1 & T1 & D1 \\\\
S1 & S3 & D1 \\\\ D1 & D1 & D1 \\\\
D1 & S2 & D1 \\\\ S2 & S2 & D1 \кінець{array}$$
Зверніть увагу, що D1 D2 відрізняється від D2 D1, оскільки вони закінчуються різними подвоєннями. Однак, комбінація S1 T1 D1 вважається такою ж, як і T1 S1 D1. До того ж, не потрібно вказувати промахи у комбінаціях; наприклад, D3 це те саме, що й 0 D3 і 0 0 D3. Неймовірно, що загалом існує 42336 різних способів чекауту. Скільки різних способів чекауту має гравець з балом меншим за 100?

View File

@ -14,11 +14,16 @@ $$n × n × \ldots × n = n^{15}$$
Якщо скористатися "двійковим" методом, можна обчислити, виконавши 6 множень:
$$\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}$$
$$\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}$$
Проте кількість множень ще можна зменшити до 5:
$$\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}$$
$$\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}$$
Визначаємо $m(k)$ як мінімальну кількість множень для обчислення $n^k$. Наприклад, $m(15) = 5$.

View File

@ -14,7 +14,8 @@ dashedName: problem-137-fibonacci-golden-nuggets
Дивовижно,
$$\begin{align} A_F(\frac{1}{2}) & = (\frac{1}{2}) × 1 + {(\frac{1}{2})}^2 × 1 + {(\frac{1}{2})}^3 × 2 + {(\frac{1}{2})}^4 × 3 + {(\frac{1}{2})}^5 × 5 + \cdots \\\\ & = \frac{1}{2} + \frac{1}{4} + \frac{2}{8} + \frac{3}{16} + \frac{5}{32} + \cdots \\\\ & = 2 \end{align}$$
$$\begin{align} A_F(\frac{1}{2}) & = (\frac{1}{2}) × 1 + {(\frac{1}{2})}^2 × 1 + {(\frac{1}{2})}^3 × 2 + {(\frac{1}{2})}^4 × 3 + {(\frac{1}{2})}^5 × 5 + \cdots \\\\
& = \frac{1}{2} + \frac{1}{4} + \frac{2}{8} + \frac{3}{16} + \frac{5}{32} + \cdots \\\\ & = 2 \end{align}$$
Відповідні значення $x$ для перших п'яти натуральних чисел наведено нижче.

View File

@ -17,13 +17,17 @@ dashedName: problem-150-searching-a-triangular-array-for-a-sub-triangle-having-m
Ми хочемо створити такий трикутний масив з тисячею рядків, тому ми генеруємо 500500 псевдовипадкових чисел $s_k$ у діапазоні $±2^{19}$, використовуючи тип генератора випадкових чисел (відомий як лінійний конгруентний метод) наступним чином:
$$\begin{align} t := & \\ 0\\\\ \text{for}\\ & k = 1\\ \text{up to}\\ k = 500500:\\\\ & t := (615949 × t + 797807)\\ \text{modulo}\\ 2^{20}\\\\ & s_k := t 219\\\\ \end{align}$$
$$\begin{align} t := & \\ 0\\\\
\text{for}\\ & k = 1\\ \text{up to}\\ k = 500500:\\\\ & t := (615949 × t + 797807)\\ \text{modulo}\\ 2^{20}\\\\
& s_k := t 219\\\\ \end{align}$$
Таким чином: $s_1 = 273519$, $s_2 = 153582$, $s_3 = 450905$ і т. д.
Трикутний масив утворений з використанням псевдовипадкових чисел:
$$ s_1 \\\\ s_2\\;s_3 \\\\ s_4\\; s_5\\; s_6 \\\\ s_7\\; s_8\\; s_9\\; s_{10} \\\\ \ldots $$
$$ s_1 \\\\
s_2\\;s_3 \\\\ s_4\\; s_5\\; s_6 \\\\
s_7\\; s_8\\; s_9\\; s_{10} \\\\ \ldots $$
Менші трикутники можуть починатися з будь-якого елемента масиву і сягати вниз як завгодно далеко (захоплюючи два елементи безпосередньо під ним з наступного ряду, три елементи безпосередньо під ним з наступного ряду і так далі).

View File

@ -12,7 +12,10 @@ dashedName: problem-157-solving-the-diophantine-equation
Якщо $n = 1$ дане рівняння має 20 розв'язків, показаних нижче:
$$\begin{array}{lllll} \frac{1}{1} + \frac{1}{1} = \frac{20}{10} & \frac{1}{1} + \frac{1}{2} = \frac{15}{10} & \frac{1}{1} + \frac{1}{5} = \frac{12}{10} & \frac{1}{1} + \frac{1}{10} = \frac{11}{10} & \frac{1}{2} + \frac{1}{2} = \frac{10}{10} \\\\ \frac{1}{2} + \frac{1}{5} = \frac{7}{10} & \frac{1}{2} + \frac{1}{10} = \frac{6}{10} & \frac{1}{3} + \frac{1}{6} = \frac{5}{10} & \frac{1}{3} + \frac{1}{15} = \frac{4}{10} & \frac{1}{4} + \frac{1}{4} = \frac{5}{10} \\\\ \frac{1}{4} + \frac{1}{4} = \frac{5}{10} & \frac{1}{5} + \frac{1}{5} = \frac{4}{10} & \frac{1}{5} + \frac{1}{10} = \frac{3}{10} & \frac{1}{6} + \frac{1}{30} = \frac{2}{10} & \frac{1}{10} + \frac{1}{10} = \frac{2}{10} \\\\ \frac{1}{11} + \frac{1}{110} = \frac{1}{10} & \frac{1}{12} + \frac{1}{60} = \frac{1}{10} & \frac{1}{14} + \frac{1}{35} = \frac{1}{10} & \frac{1}{15} + \frac{1}{30} = \frac{1}{10} & \frac{1}{20} + \frac{1}{20} = \frac{1}{10} \end{array}$$
$$\begin{array}{lllll} \frac{1}{1} + \frac{1}{1} = \frac{20}{10} & \frac{1}{1} + \frac{1}{2} = \frac{15}{10} & \frac{1}{1} + \frac{1}{5} = \frac{12}{10} & \frac{1}{1} + \frac{1}{10} = \frac{11}{10} & \frac{1}{2} + \frac{1}{2} = \frac{10}{10} \\\\
\frac{1}{2} + \frac{1}{5} = \frac{7}{10} & \frac{1}{2} + \frac{1}{10} = \frac{6}{10} & \frac{1}{3} + \frac{1}{6} = \frac{5}{10} & \frac{1}{3} + \frac{1}{15} = \frac{4}{10} & \frac{1}{4} + \frac{1}{4} = \frac{5}{10} \\\\
\frac{1}{4} + \frac{1}{4} = \frac{5}{10} & \frac{1}{5} + \frac{1}{5} = \frac{4}{10} & \frac{1}{5} + \frac{1}{10} = \frac{3}{10} & \frac{1}{6} + \frac{1}{30} = \frac{2}{10} & \frac{1}{10} + \frac{1}{10} = \frac{2}{10} \\\\
\frac{1}{11} + \frac{1}{110} = \frac{1}{10} & \frac{1}{12} + \frac{1}{60} = \frac{1}{10} & \frac{1}{14} + \frac{1}{35} = \frac{1}{10} & \frac{1}{15} + \frac{1}{30} = \frac{1}{10} & \frac{1}{20} + \frac{1}{20} = \frac{1}{10} \end{array}$$
Скільки розв'язків має це рівняння, якщо $1 ≤ n 9$?

View File

@ -12,7 +12,10 @@ dashedName: problem-159-digital-root-sums-of-factorisations
Наприклад, за виключенням множення на один, 24 можна факторизувати 7 різними способами:
$$\begin{align} & 24 = 2 \times 2 \times 2 \times 3\\\\ & 24 = 2 \times 3 \times 4 \\\\ & 24 = 2 \times 2 \times 6 \\\\ & 24 = 4 \times 6 \\\\ & 24 = 3 \times 8 \\\\ & 24 = 2 \times 12 \\\\ & 24 = 24 \end{align}$$
$$\begin{align} & 24 = 2 \times 2 \times 2 \times 3\\\\
& 24 = 2 \times 3 \times 4 \\\\ & 24 = 2 \times 2 \times 6 \\\\
& 24 = 4 \times 6 \\\\ & 24 = 3 \times 8 \\\\
& 24 = 2 \times 12 \\\\ & 24 = 24 \end{align}$$
Нагадаємо, що цифровий корінь числа в основі 10 знаходять додаванням цифр цього числа, повторюючи процес, поки число не буде менше ніж 10. Цифровий корінь 467 буде 8.

View File

@ -12,7 +12,8 @@ dashedName: problem-160-factorial-trailing-digits
Наприклад,
$$\begin{align} & 9! = 362880 \\; \text{so} \\; f(9) = 36288 \\\\ & 10! = 3628800 \\; \text{so} \\; f(10) = 36288 \\\\ & 20! = 2432902008176640000 \\; \text{so} \\; f(20) = 17664 \end{align}$$
$$\begin{align} & 9! = 362880 \\; \text{so} \\; f(9) = 36288 \\\\
& 10! = 3628800 \\; \text{so} \\; f(10) = 36288 \\\\ & 20! = 2432902008176640000 \\; \text{so} \\; f(20) = 17664 \end{align}$$
Знайдіть $f(1,000,000,000,000)$

View File

@ -18,7 +18,8 @@ dashedName: problem-163-cross-hatched-triangles
Якщо позначити $T(n)$ як кількість трикутників, що містяться в трикутнику розміру $n$, тоді
$$\begin{align} & T(1) = 16 \\\\ & T(2) = 104 \end{align}$$
$$\begin{align} & T(1) = 16 \\\\
& T(2) = 104 \end{align}$$
Знайдіть $T(36)$.

View File

@ -16,13 +16,17 @@ dashedName: problem-165-intersections
Розглянемо три сегменти $L_1$, $L_2$та $L_3$:
$\begin{align} & L_1: (27, 44) \\;\text{to}\\; (12, 32) \\\\ & L_2: (46, 53) \\;\tтекст{to}\\; (17, 62) \\\\ & L_3: (46, 70) \\;\tтекст{to}\\; (22, 40) \\\\ \end{align}$$
$\begin{align} & L_1: (27, 44) \\;\text{to}\\; (12, 32) \\\\
& L_2: (46, 53) \\;\tтекст{to}\\; (17, 62) \\\\ & L_3: (46, 70) \\;\tтекст{to}\\; (22, 40) \\\\
\end{align}$$
Можна перевірити, що відрізки ліній $L_2$ і $L_3$ мають справжню точку перетину. Ми зазначали, що, якщо одна з кінцевих точок $L_3$: (22, 40) лежить на $L_1$, це не вважається справжньою точкою перетину. $L_1$ і $L_2$ не мають спільної точки. Отже, на трьох відрізках прямої ми знаходимо одну справжню точку перетину.
Тепер зробімо те саме для 5000 прямих відрізків. З цією метою ми згенеруємо 20000 чисел, використовуючи так званий генератор псевдо-випадкових чисел «Blum Blum Shub».
$\begin{align} & s_0 = 290797 \\\\ & s_{n + 1} = s_n × s_n (\text{modulo}\\; 50515093) \\\\ & t_n = s_n (\text{modulo}\\; 500) \\\\ \end{align}$
$\begin{align} & s_0 = 290797 \\\\
& s_{n + 1} = s_n × s_n (\text{modulo}\\; 50515093) \\\\ & t_n = s_n (\text{modulo}\\; 500) \\\\
\end{align}$
Щоб створити кожен відрізок, ми використовуємо чотири послідовних числа $t_n$. Тобто перший відрізок дано:

View File

@ -12,7 +12,9 @@ dashedName: problem-166-criss-cross
Видно, що в таблиці
$$\begin{array}{} 6 & 3 & 3 & 0 \\\\ 5 & 0 & 4 & 3 \\\\ 0 & 7 & 1 & 4 \\\\ 1 & 2 & 4 & 5 \end{array}$$
$$\begin{array}{} 6 & 3 & 3 & 0 \\\\
5 & 0 & 4 & 3 \\\\ 0 & 7 & 1 & 4 \\\\
1 & 2 & 4 & 5 \end{array}$$
сума кожного рядка та кожного стовпця має значення 12. Крім того, сума кожної діагоналі також дорівнює 12.

View File

@ -14,7 +14,9 @@ dashedName: >-
Наприклад: $f(10)=5$, оскільки існує 5 різних способів виразити 10:
$$\begin{align} & 1 + 1 + 8 \\\\ & 1 + 1 + 4 + 4 \\\\ & 1 + 1 + 2 + 2 + 4 \\\\ & 2 + 4 + 4 \\\\ & 2 + 8 \end{align}$$
$$\begin{align} & 1 + 1 + 8 \\\\
& 1 + 1 + 4 + 4 \\\\ & 1 + 1 + 2 + 2 + 4 \\\\
& 2 + 4 + 4 \\\\ & 2 + 8 \end{align}$$
Що таке $f({10}^{25})$?

View File

@ -12,7 +12,8 @@ dashedName: >-
Помножте число 6 на кожне з 1273 і 9854:
$$\begin{align} & 6 × 1273 = 7638 \\\\ & 6 × 9854 = 59124 \\\\ \end{align}$$
$$\begin{align} & 6 × 1273 = 7638 \\\\
& 6 × 9854 = 59124 \\\\ \end{align}$$
Об’єднавши ці добутки, отримуємо панцифрове число від 1 до 9 - 763859124. Нехай 763859124 — об'єднаний добуток 6 і (1273, 9854)". Зауважте також, що об'єднання вхідних чисел 612739854 також становить панцифрове число від 1 до 9.

View File

@ -12,7 +12,9 @@ dashedName: >-
Для додатного цілого числа $n$, нехай $f(n)$ — це сума квадратів чисел (з основою 10) $n$, наприклад.
$$\begin{align} & f(3) = 3^2 = 9 \\\\ & f(25) = 2^2 + 5^2 = 4 + 25 = 29 \\\\ & f(442) = 4^2 + 4^2 + 2^2 = 16 + 16 + 4 = 36 \\\\ \end{align}$$
$$\begin{align} & f(3) = 3^2 = 9 \\\\
& f(25) = 2^2 + 5^2 = 4 + 25 = 29 \\\\ & f(442) = 4^2 + 4^2 + 2^2 = 16 + 16 + 4 = 36 \\\\
\end{align}$$
Знайдіть останні дев'ять чисел суми усіх $n$, $0 &lt; n &lt; {10}^{20}$, якщо $f(n)$ є повним квадратом.

View File

@ -10,7 +10,8 @@ dashedName: problem-180-rational-zeros-of-a-function-of-three-variables
Для будь-якого цілого числа $n$ розглянемо три функції
$$\begin{align} & f_{1,n}(x,y,z) = x^{n + 1} + y^{n + 1} z^{n + 1}\\\\ & f_{2,n}(x,y,z) = (xy + yz + zx) \times (x^{n - 1} + y^{n - 1} z^{n - 1})\\\\ & f_{3,n}(x,y,z) = xyz \times (x^{n - 2} + y^{n - 2} z^{n - 2}) \end{align}$$
$$\begin{align} & f_{1,n}(x,y,z) = x^{n + 1} + y^{n + 1} z^{n + 1}\\\\
& f_{2,n}(x,y,z) = (xy + yz + zx) \times (x^{n - 1} + y^{n - 1} z^{n - 1})\\\\ & f_{3,n}(x,y,z) = xyz \times (x^{n - 2} + y^{n - 2} z^{n - 2}) \end{align}$$
та їхню комбінацію

View File

@ -14,7 +14,10 @@ dashedName: problem-185-number-mind
Наприклад, для секретної послідовності 5 цифр,
$$\begin{align} & 90342 ;2\\;\text{correct}\\\\ & 70794 ;0\\;\text{correct}\\\\ & 39458 ;2\\;\text{correct}\\\\ & 34109 ;1\\;\text{correct}\\\\ & 51545 ;2\\;\text{correct}\\\\ & 12531 ;1\\;\text{correct} \end{align}$$
$$\begin{align} & 90342 ;2\\;\text{correct}\\\\
& 70794 ;0\\;\text{correct}\\\\ & 39458 ;2\\;\text{correct}\\\\
& 34109 ;1\\;\text{correct}\\\\ & 51545 ;2\\;\text{correct}\\\\
& 12531 ;1\\;\text{correct} \end{align}$$
Правильна послідовність 39542 унікальна.

View File

@ -10,7 +10,13 @@ dashedName: problem-196-prime-triplets
Побудуйте трикутник з усіх додатних чисел наступним чином:
$$\begin{array}{rrr} & 1 \\\\ & \color{red}{2} & \color{red}{3} \\\\ & 4 & \color{red}{5} & 6 \\\\ & \color{red}{7} & 8 & 9 & 10 \\\\ & \color{red}{11} & 12 & \color{red}{13} & 14 & 15 \\\\ & 16 & \color{red}{17} & 18 & \color{red}{19} & 20 & 21 \\\\ & 22 & \color{red}{23} & 24 & 25 & 26 & 27 & 28 \\\\ & \color{red}{29} & 30 & \color{red}{31} & 32 & 33 & 34 & 35 & 36 \\\\ & \color{red}{37} & 38 & 39 & 40 & \color{red}{41} & 42 & \color{red}{43} & 44 & 45 \\\\ & 46 & \color{red}{47} & 48 & 49 & 50 & 51 & 52 & \color{red}{53} & 54 & 55 \\\\ & 56 & 57 & 58 & \color{red}{59} & 60 & \color{red}{61} & 62 & 63 & 64 & 65 & 66 \\\\ & \cdots \end{array}$$
$$\begin{array}{rrr} & 1 \\\\
& \color{red}{2} & \color{red}{3} \\\\ & 4 & \color{red}{5} & 6 \\\\
& \color{red}{7} & 8 & 9 & 10 \\\\ & \color{red}{11} & 12 & \color{red}{13} & 14 & 15 \\\\
& 16 & \color{red}{17} & 18 & \color{red}{19} & 20 & 21 \\\\ & 22 & \color{red}{23} & 24 & 25 & 26 & 27 & 28 \\\\
& \color{red}{29} & 30 & \color{red}{31} & 32 & 33 & 34 & 35 & 36 \\\\ & \color{red}{37} & 38 & 39 & 40 & \color{red}{41} & 42 & \color{red}{43} & 44 & 45 \\\\
& 46 & \color{red}{47} & 48 & 49 & 50 & 51 & 52 & \color{red}{53} & 54 & 55 \\\\ & 56 & 57 & 58 & \color{red}{59} & 60 & \color{red}{61} & 62 & 63 & 64 & 65 & 66 \\\\
& \cdots \end{array}$$
У трикутнику біля кожного додатного числа є ще до восьми чисел.

View File

@ -12,7 +12,17 @@ dashedName: problem-201-subsets-with-a-unique-sum
Розглянемо набір $B = \\{1,3,6,8,10,11\\}$. Існує 20 підмножин $B$, що містять три елементи, і їх сумидорівнюють:
$$\begin{align} & sum(\\{1,3,6\\}) = 10 \\\\ & sum(\\{1,3,8\\}) = 12 \\\\ & sum(\\{1,3,10\\}) = 14 \\\\ & sum(\\{1,3,11\\}) = 15 \\\\ & sum(\\{1,6,8\\}) = 15 \\\\ & sum(\\{1,6,10\\}) = 17 \\\\ & sum(\\{1,6,11\\}) = 18 \\\\ & sum(\\{1,8,10\\}) = 19 \\\\ & sum(\\{1,8,11\\}) = 20 \\\\ & sum(\\{1,10,11\\}) = 22 \\\\ & sum(\\{3,6,8\\}) = 17 \\\\ & sum(\\{3,6,10\\}) = 19 \\\\ & sum(\\{3,6,11\\}) = 20 \\\\ & sum(\\{3,8,10\\}) = 21 \\\\ & sum(\\{3,8,11\\}) = 22 \\\\ & sum(\\{3,10,11\\}) = 24 \\\\ & sum(\\{6,8,10\\}) = 24 \\\\ & sum(\\{6,8,11\\}) = 25 \\\\ & sum(\\{6,10,11\\}) = 27 \\\\ & sum(\\{8,10,11\\}) = 29 \\end{align}$$
$$\begin{align} & sum(\\{1,3,6\\}) = 10 \\\\
& sum(\\{1,3,8\\}) = 12 \\\\ & sum(\\{1,3,10\\}) = 14 \\\\
& sum(\\{1,3,11\\}) = 15 \\\\ & sum(\\{1,6,8\\}) = 15 \\\\
& sum(\\{1,6,10\\}) = 17 \\\\ & sum(\\{1,6,11\\}) = 18 \\\\
& sum(\\{1,8,10\\}) = 19 \\\\ & sum(\\{1,8,11\\}) = 20 \\\\
& sum(\\{1,10,11\\}) = 22 \\\\ & sum(\\{3,6,8\\}) = 17 \\\\
& sum(\\{3,6,10\\}) = 19 \\\\ & sum(\\{3,6,11\\}) = 20 \\\\
& sum(\\{3,8,10\\}) = 21 \\\\ & sum(\\{3,8,11\\}) = 22 \\\\
& sum(\\{3,10,11\\}) = 24 \\\\ & sum(\\{6,8,10\\}) = 24 \\\\
& sum(\\{6,8,11\\}) = 25 \\\\ & sum(\\{6,10,11\\}) = 27 \\\\
& sum(\\{8,10,11\\}) = 29 \\end{align}$$
Деякі з цих сум трапляються більше, ніж один раз, інші - унікальні. Для набору $A$ нехай $U(A,k)$ буде набором унікальних сум $k$-елементних підмножин $A$, у нашому прикладі ми знаходимо $U(B,3) = \\{10,12,14,18,21,25,27,29\\}$ і $sum(U(B,3)) = 156$.

View File

@ -10,7 +10,11 @@ dashedName: problem-203-squarefree-binomial-coefficients
Біноміальні коефіцієнти $\displaystyle\binom{n}{k}$ можна розташувати у формі трикутника (трикутник Паскаля) наступним чином:
$$\begin{array}{ccccccccccccccc} & & & & & & & 1 & & & & & & & \\\\ & & & & & & 1 & & 1 & & & & & & \\\\ & & & & & 1 & & 2 & & 1 & & & & & \\\\ & & & & 1 & & 3 & & 3 & & 1 & & & & \\\\ & & & 1 & & 4 & & 6 & & 4 & & 1 & & & \\\\ & & 1 & & 5 & & 10 & & 10 & & 5 & & 1 & & \\\\ & 1 & & 6 & & 15 & & 20 & & 15 & & 6 & & 1 & \\\\ 1 & & 7 & & 21 & & 35 & & 35 & & 21 & & 7 & & 1 \\\\ & & & & & & & \ldots \end{array}$$
$$\begin{array}{ccccccccccccccc} & & & & & & & 1 & & & & & & & \\\\
& & & & & & 1 & & 1 & & & & & & \\\\ & & & & & 1 & & 2 & & 1 & & & & & \\\\
& & & & 1 & & 3 & & 3 & & 1 & & & & \\\\ & & & 1 & & 4 & & 6 & & 4 & & 1 & & & \\\\
& & 1 & & 5 & & 10 & & 10 & & 5 & & 1 & & \\\\ & 1 & & 6 & & 15 & & 20 & & 15 & & 6 & & 1 & \\\\
1 & & 7 & & 21 & & 35 & & 35 & & 21 & & 7 & & 1 \\\\ & & & & & & & \ldots \end{array}$$
Можна побачити, що перші вісім рядків трикутника Паскаля містять дванадцять різних чисел: 1, 2, 3, 4, 5, 6, 7, 10, 15, 20, 21 та 35.

View File

@ -20,7 +20,11 @@ dashedName: problem-207-integer-partition-equations
У таблиці нижче перераховано деякі значення $P(m)$
$$\begin{align} & P(5) = \frac{1}{1} \\\\ & P(10) = \frac{1}{2} \\\\ & P(15) = \frac{2}{3} \\\\ & P(20) = \frac{1}{2} \\\\ & P(25) = \frac{1}{2} \\\\ & P(30) = \frac{2}{5} \\\\ & \ldots \\\\ & P(180) = \frac{1}{4} \\\\ & P(185) = \frac{3}{13} \end{align}$$
$$\begin{align} & P(5) = \frac{1}{1} \\\\
& P(10) = \frac{1}{2} \\\\ & P(15) = \frac{2}{3} \\\\
& P(20) = \frac{1}{2} \\\\ & P(25) = \frac{1}{2} \\\\
& P(30) = \frac{2}{5} \\\\ & \ldots \\\\
& P(180) = \frac{1}{4} \\\\ & P(185) = \frac{3}{13} \end{align}$$
Знайдіть найменший $m$ для якого $P(m) &lt; \frac{1}{12\\,345}$

View File

@ -12,7 +12,10 @@ dashedName: problem-212-combined-volume-of-cuboids
Нехай $C_1, \ldots, C_{50000}$ — це набір 50000 вирівняних по осі паралелепіпедів, кожен паралелепіпед $C_n$ має такі параметри
$$\begin{align} & x_0 = S_{6n - 5} \\; \text{modulo} \\; 10000 \\\\ & y_0 = S_{6n - 4} \\; \text{modulo} \\; 10000 \\\\ & z_0 = S_{6n - 3} \\; \text{modulo} \\; 10000 \\\\ & dx = 1 + (S_{6n - 2} \\; \text{modulo} \\; 399) \\\\ & dy = 1 + (S_{6n - 1} \\; \text{modulo} \\; 399) \\\\ & dz = 1 + (S_{6n} \\; \text{modulo} \\; 399) \\\\ \end{align}$$
$$\begin{align} & x_0 = S_{6n - 5} \\; \text{modulo} \\; 10000 \\\\
& y_0 = S_{6n - 4} \\; \text{modulo} \\; 10000 \\\\ & z_0 = S_{6n - 3} \\; \text{modulo} \\; 10000 \\\\
& dx = 1 + (S_{6n - 2} \\; \text{modulo} \\; 399) \\\\ & dy = 1 + (S_{6n - 1} \\; \text{modulo} \\; 399) \\\\
& dz = 1 + (S_{6n} \\; \text{modulo} \\; 399) \\\\ \end{align}$$
де $S_1, \ldots, S_{300000}$ отримуємо через генератор Фібоначчі:

View File

@ -12,7 +12,11 @@ dashedName: problem-214-totient-chains
При повторенні функції $φ$, кожне додатне ціле число утворює спадну послідовність чисел, що закінчується одиницею. Наприклад, якщо ми почнемо з 5, то утвориться послідовність 5,4,2,1. Ось список послідовностей, що складаються з 4 цифр:
$$\begin{align} 5,4,2,1 & \\\\ 7,6,2,1 & \\\\ 8,4,2,1 & \\\\ 9,6,2,1 & \\\\ 10,4,2,1 & \\\\ 12,4,2,1 & \\\\ 14,6,2,1 & \\\\ 18,6,2,1 & \end{align}$$
$$\begin{align} 5,4,2,1 & \\\\
7,6,2,1 & \\\\ 8,4,2,1 & \\\\
9,6,2,1 & \\\\ 10,4,2,1 & \\\\
12,4,2,1 & \\\\ 14,6,2,1 & \\\\
18,6,2,1 & \end{align}$$
Лише дві з цих послідовностей починаються з простого числа, їхня сума — 12.

View File

@ -10,7 +10,8 @@ dashedName: problem-228-minkowski-sums
Нехай $S_n$ — це правильний $n$-сторонній багатокутник або фігура, у якої вершини $v_k (k = 1, 2, \ldots, n)$ мають координати:
$$\begin{align} & x_k = cos(\frac{2k - 1}{n} × 180°) \\\\ & y_k = sin(\frac{2k - 1}{n} × 180°) \end{align}$$
$$\begin{align} & x_k = cos(\frac{2k - 1}{n} × 180°) \\\\
& y_k = sin(\frac{2k - 1}{n} × 180°) \end{align}$$
Кожен $S_n$ зображено зафарбованою фігурою, яка складається з усіх точок на периметрі та всередині.

View File

@ -10,13 +10,17 @@ dashedName: problem-229-four-representations-using-squares
Розглянемо число 3600. Воно дуже особливе, оскільки
$$\begin{align} & 3600 = {48}^2 + {36}^2 \\\\ & 3600 = {20}^2 + {2×40}^2 \\\\ & 3600 = {30}^2 + {3×30}^2 \\\\ & 3600 = {45}^2 + {7×15}^2 \\\\ \end{align}$$
$$\begin{align} & 3600 = {48}^2 + {36}^2 \\\\
& 3600 = {20}^2 + {2×40}^2 \\\\ & 3600 = {30}^2 + {3×30}^2 \\\\
& 3600 = {45}^2 + {7×15}^2 \\\\ \end{align}$$
Аналогічно бачимо, що $88201 = {99}^2 + {280}^2 = {287}^2 + 2 × {54}^2 = {283}^2 + 3 × {52}^2 = {197}^2 + 7 × {84}^2$.
У 1747 році Ейлер довів які числа є сумою двох квадратів. Нас цікавлять числа $n$, які можна виразити через наступні чотири формули:
$$\begin{align} & n = {a_1}^2 + {b_1}^2 \\\\ & n = {a_2}^2 + 2{b_2}^2 \\\\ & n = {a_3}^2 + 3{b_3}^2 \\\\ & n = {a_7}^2 + 7{b_7}^2 \\\\ \end{align}$$
$$\begin{align} & n = {a_1}^2 + {b_1}^2 \\\\
& n = {a_2}^2 + 2{b_2}^2 \\\\ & n = {a_3}^2 + 3{b_3}^2 \\\\
& n = {a_7}^2 + 7{b_7}^2 \\\\ \end{align}$$
де $a_k$ та $b_k$ додатні цілі числа.

View File

@ -18,17 +18,21 @@ dashedName: problem-230-fibonacci-words
Першими елементами $F_{A,B}$ є:
$$\begin{align} & 1\\,415\\,926\\,535 \\\\ & 8\\,979\\,323\\,846 \\\\ & 14\\,159\\,265\\,358\\,979\\,323\\,846 \\\\ & 897\\,932\\,384\\,614\\,159\\,265\\,358\\,979\\,323\\,846 \\\\ & 14\\,159\\,265\\,358\\,979\\,323\\,846\\,897\\,932\\,384\\,614\\,15\color{red}{9}\\,265\\,358\\,979\\,323\\,846 \end{align}$$
$$\begin{align} & 1\\,415\\,926\\,535 \\\\
& 8\\,979\\,323\\,846 \\\\ & 14\\,159\\,265\\,358\\,979\\,323\\,846 \\\\
& 897\\,932\\,384\\,614\\,159\\,265\\,358\\,979\\,323\\,846 \\\\ & 14\\,159\\,265\\,358\\,979\\,323\\,846\\,897\\,932\\,384\\,614\\,15\color{red}{9}\\,265\\,358\\,979\\,323\\,846 \end{align}$$
Тоді $D_{A,B}(35)$ — це ${35}^{\text{th}}$ цифра п'ятого елемента, тобто 9.
Тепер для $A$ використовуємо перші 100 цифр після десяткового розділювача:
$$\begin{align} & 14\\,159\\,265\\,358\\,979\\,323\\,846\\,264\\,338\\,327\\,950\\,288\\,419\\,716\\,939\\,937\\,510 \\\\ & 58\\,209\\,749\\,445\\,923\\,078\\,164\\,062\\,862\\,089\\,986\\,280\\,348\\,253\\,421\\,170\\,679 \end{align}$$
$$\begin{align} & 14\\,159\\,265\\,358\\,979\\,323\\,846\\,264\\,338\\,327\\,950\\,288\\,419\\,716\\,939\\,937\\,510 \\\\
& 58\\,209\\,749\\,445\\,923\\,078\\,164\\,062\\,862\\,089\\,986\\,280\\,348\\,253\\,421\\,170\\,679 \end{align}$$
і для $B$ наступні 100 цифр:
$$\begin{align} & 82\\,148\\,086\\,513\\,282\\,306\\,647\\,093\\,844\\,609\\,550\\,582\\,231\\,725\\,359\\,408\\,128 \\\\ & 48\\,111\\,745\\,028\\,410\\,270\\,193\\,852\\,110\\,555\\,964\\,462\\,294\\,895\\,493\\,038\\,196 \end{align}$$
$$\begin{align} & 82\\,148\\,086\\,513\\,282\\,306\\,647\\,093\\,844\\,609\\,550\\,582\\,231\\,725\\,359\\,408\\,128 \\\\
& 48\\,111\\,745\\,028\\,410\\,270\\,193\\,852\\,110\\,555\\,964\\,462\\,294\\,895\\,493\\,038\\,196 \end{align}$$
Знайдіть $\sum_{n = 0, 1, \ldots, 17} {10}^n × D_{A,B}((127 + 19n) × 7^n)$.

View File

@ -10,7 +10,8 @@ dashedName: problem-238-infinite-string-tour
Створіть послідовність чисел, використовуючи генератор псевдовипадкових чисел "Блум Блум Шуба":
$$ s_0 = 14025256 \\\\ s_{n + 1} = {s_n}^2 \\; mod \\; 20\\,300\\,713 $$
$$ s_0 = 14025256 \\\\
s_{n + 1} = {s_n}^2 \\; mod \\; 20\\,300\\,713 $$
Об'єднайте ці числа $s_0s_1s_2\ldots$, щоб створити рядок $w$ нескінченної довжини. Тоді $w = 14025256741014958470038053646\ldots$

View File

@ -10,7 +10,9 @@ dashedName: problem-240-top-dice
Якщо кинути п'ять 6-гранних кубиків (грані пронумеровано від 1 до 6), у 1111 випадках сума трьох найбільших чисел дорівнюватиме 15. Ось декілька прикладів:
$$\begin{align} & D_1,D_2,D_3,D_4,D_5 = 4,3,6,3,5 \\\\ & D_1,D_2,D_3,D_4,D_5 = 4,3,3,5,6 \\\\ & D_1,D_2,D_3,D_4,D_5 = 3,3,3,6,6 \\\\ & D_1,D_2,D_3,D_4,D_5 = 6,6,3,3,3 \end{align}$$
$$\begin{align} & D_1,D_2,D_3,D_4,D_5 = 4,3,6,3,5 \\\\
& D_1,D_2,D_3,D_4,D_5 = 4,3,3,5,6 \\\\ & D_1,D_2,D_3,D_4,D_5 = 3,3,3,6,6 \\\\
& D_1,D_2,D_3,D_4,D_5 = 6,6,3,3,3 \end{align}$$
Якщо кинути двадцять 12-гранних кубиків (грані пронумеровано від 1 до 12), у скількох випадках сума десятьох найбільших чисел дорівнюватиме 70?

View File

@ -16,7 +16,9 @@ dashedName: problem-244-sliders
Для кожного шляху його контрольна сума обчислюється так (псевдокод):
$$\begin{align} & \text{checksum} = 0 \\\\ & \text{checksum} = (\text{checksum} × 243 + m_1) \\; \text{mod} \\; 100\\,000\\,007 \\\\ & \text{checksum} = (\text{checksum} × 243 + m_2) \\; \text{mod} \\; 100\\,000\\,007 \\\\ & \ldots \\\\ & \text{checksum} = (\text{checksum} × 243 + m_n) \\; \text{mod} \\; 100\\,000\\,007 \end{align}$$
$$\begin{align} & \text{checksum} = 0 \\\\
& \text{checksum} = (\text{checksum} × 243 + m_1) \\; \text{mod} \\; 100\\,000\\,007 \\\\ & \text{checksum} = (\text{checksum} × 243 + m_2) \\; \text{mod} \\; 100\\,000\\,007 \\\\
& \ldots \\\\ & \text{checksum} = (\text{checksum} × 243 + m_n) \\; \text{mod} \\; 100\\,000\\,007 \end{align}$$
де $m_k$ — ASCII код букви $k^{\text{th}}$ в послідовності ходів. Ось ASCII коди для ходів:

View File

@ -16,7 +16,8 @@ dashedName: problem-252-convex-holes
Наприклад, ми використали перші 20 точок ($T_{2k 1}$, $T_{2k}$), для $k = 1, 2, \ldots, 20$, отриманих за допомогою генератора псевдовипадкових чисел:
$$\begin{align} S_0 & = 290\\,797 \\\\ S_{n+1} & = {S_n}^2 \\; \text{mod} \\; 50\\,515\\,093 \\\\ T_n & = (S_n \\; \text{mod} \\; 2000) 1000 \end{align}$$
$$\begin{align} S_0 & = 290\\,797 \\\\
S_{n+1} & = {S_n}^2 \\; \text{mod} \\; 50\\,515\\,093 \\\\ T_n & = (S_n \\; \text{mod} \\; 2000) 1000 \end{align}$$
тобто (527, 144), (488, 732), (454, 947), …

View File

@ -28,7 +28,8 @@ $$x_{k + 1} = \left\lfloor\frac{x_k + \left\lceil\frac{n}{x_k}\right\rceil}{2}\r
$n$ складається з 4 цифр, тож $x_0 = 7 × {10}^{\frac{4-2}{2}} = 70$.
$$x_1 = \left\lfloor\frac{70 + \left\lceil\frac{4321}{70}\right\rceil}{2}\right\rfloor = 66 \\\\ x_2 = \left\lfloor\frac{66 + \left\lceil\frac{4321}{66}\right\rceil}{2}\right\rfloor = 66$$
$$x_1 = \left\lfloor\frac{70 + \left\lceil\frac{4321}{70}\right\rceil}{2}\right\rfloor = 66 \\\\
x_2 = \left\lfloor\frac{66 + \left\lceil\frac{4321}{66}\right\rceil}{2}\right\rfloor = 66$$
Оскільки $x_2 = x_1$, тут зупиняємося. Таким чином, після всього двох ітерацій, ми виявили, що округлений квадратний корінь 4321 дорівнює 66 (точне значення квадратного кореня — 65,7343137...).

View File

@ -14,7 +14,9 @@ $${(k - m)}^2 + \ldots + k^2 = {(n + 1)}^2 + \ldots + {(n + m)}^2$$
Деякі маленькі квадратні повороти є
$$\begin{align} & \mathbf{4}: 3^2 + \mathbf{4}^2 = 5^2 \\\\ & \mathbf{21}: {20}^2 + \mathbf{21}^2 = {29}^2 \\\\ & \mathbf{24}: {21}^2 + {22}^2 + {23}^2 + \mathbf{24}^2 = {25}^2 + {26}^2 + {27}^2 \\\\ & \mathbf{110}: {108}^2 + {109}^2 + \mathbf{110}^2 = {133}^2 + {134}^2 \\\\ \end{align}$$
$$\begin{align} & \mathbf{4}: 3^2 + \mathbf{4}^2 = 5^2 \\\\
& \mathbf{21}: {20}^2 + \mathbf{21}^2 = {29}^2 \\\\ & \mathbf{24}: {21}^2 + {22}^2 + {23}^2 + \mathbf{24}^2 = {25}^2 + {26}^2 + {27}^2 \\\\
& \mathbf{110}: {108}^2 + {109}^2 + \mathbf{110}^2 = {133}^2 + {134}^2 \\\\ \end{align}$$
Знайдіть суму всіх різних квадратних куточків $≤ {10}^{10}$.

View File

@ -10,7 +10,8 @@ dashedName: problem-282-the-ackermann-function
Для невід'ємних цілих $m$, $n$ функція Акермана $A(m, n)$ визначається таким чином:
$$A(m, n) = \begin{cases} n + 1 & \text{if $m = 0$} \\\\ A(m - 1, 1) & \text{if $m > 0$ and $n = 0$} \\\\ A(m - 1, A(m, n - 1)) & \text{if $m > 0$ and $n > 0$} \end{cases}$$
$$A(m, n) = \begin{cases} n + 1 & \text{if $m = 0$} \\\\
A(m - 1, 1) & \text{if $m > 0$ and $n = 0$} \\\\ A(m - 1, A(m, n - 1)) & \text{if $m > 0$ and $n > 0$} \end{cases}$$
Наприклад, $A(1, 0) = 2$, $A(2, 2) = 7$ and $A(3, 4) = 125$.

View File

@ -10,7 +10,8 @@ dashedName: problem-288-an-enormous-factorial
Для будь-якого цілого числа $p$ число $N(p,q)$ визначається за $N(p,q) = \sum_{n=0}^q T_n \times p^n$ з $T_n$, що створене генератором випадкових чисел:
$$\begin{align} & S_0 = 290797 \\\\ & S_{n + 1} = {S_n}^2\bmod 50\\,515\\,093 \\\\ & T_n = S_n\bmod p \end{align}$$
$$\begin{align} & S_0 = 290797 \\\\
& S_{n + 1} = {S_n}^2\bmod 50\\,515\\,093 \\\\ & T_n = S_n\bmod p \end{align}$$
Припустимо, $Nfac(p,q)$ факторіал $N(p,q)$.

View File

@ -16,7 +16,8 @@ dashedName: problem-295-lenticular-holes
Розглянемо ці кола:
$$\begin{align} & C_0: x^2 + y^2 = 25 \\\\ & C_1: {(x + 4)}^2 + {(y - 4)}^2 = 1 \\\\ & C_2: {(x - 12)}^2 + {(y - 4)}^2 = 65 \end{align}$$
$$\begin{align} & C_0: x^2 + y^2 = 25 \\\\
& C_1: {(x + 4)}^2 + {(y - 4)}^2 = 1 \\\\ & C_2: {(x - 12)}^2 + {(y - 4)}^2 = 65 \end{align}$$
Кола $C_0$, $C_1$ та $C_2$ намальовані на малюнку нижче.

View File

@ -19,7 +19,9 @@ dashedName: problem-312-cyclic-paths-on-sierpiski-graphs
Також можна перевірити, що:
$$\begin{align} & C(1) = C(2) = 1 \\\\ & C(5) = 71\\,328\\,803\\,586\\,048 \\\\ & C(10 000)\bmod {10}^8 = 37\\,652\\,224 \\\\ & C(10 000)\bmod {13}^8 = 617\\,720\\,485 \\\\ \end{align}$$
$$\begin{align} & C(1) = C(2) = 1 \\\\
& C(5) = 71\\,328\\,803\\,586\\,048 \\\\ & C(10 000)\bmod {10}^8 = 37\\,652\\,224 \\\\
& C(10 000)\bmod {13}^8 = 617\\,720\\,485 \\\\ \end{align}$$
Знайдіть $C(C(C(10\\,000)))\bmod {13}^8$.

View File

@ -12,7 +12,11 @@ dashedName: problem-318-2011-nines
Коли ми обчислимо парні степені $\sqrt{2} + \sqrt{3}$, ми отримаємо:
$$\begin{align} & {(\sqrt{2} + \sqrt{3})}^2 = 9.898979485566356\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^4 = 97.98979485566356\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^6 = 969.998969071069263\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^8 = 9601.99989585502907\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^{10} = 95049.999989479221\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^{12} = 940897.9999989371855\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^{14} = 9313929.99999989263\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^{16} = 92198401.99999998915\ldots \\\\ \end{align}$$
$$\begin{align} & {(\sqrt{2} + \sqrt{3})}^2 = 9.898979485566356\ldots \\\\
& {(\sqrt{2} + \sqrt{3})}^4 = 97.98979485566356\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^6 = 969.998969071069263\ldots \\\\
& {(\sqrt{2} + \sqrt{3})}^8 = 9601.99989585502907\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^{10} = 95049.999989479221\ldots \\\\
& {(\sqrt{2} + \sqrt{3})}^{12} = 940897.9999989371855\ldots \\\\ & {(\sqrt{2} + \sqrt{3})}^{14} = 9313929.99999989263\ldots \\\\
& {(\sqrt{2} + \sqrt{3})}^{16} = 92198401.99999998915\ldots \\\\ \end{align}$$
Схоже, що кількість послідовних дев'яток на початку дробової частини цих ступенів не зменшується. Насправді, можна довести, що дробова частина ${(\sqrt{2} + \sqrt{3})}^{2n}$ наближається до 1 для великого значення $n$.

View File

@ -12,7 +12,9 @@ dashedName: problem-324-building-a-tower
Наприклад, (з $q = 100\\,000\\,007$):
$$\begin{align} & f(2) = 229, \\\\ & f(4) = 117\\,805, \\\\ & f(10)\bmod q = 96\\,149\\,360, \\\\ & f({10}^3)\bmod q = 24\\,806\\,056, \\\\ & f({10}^6)\bmod q = 30\\,808\\,124. \end{align}$$
$$\begin{align} & f(2) = 229, \\\\
& f(4) = 117\\,805, \\\\ & f(10)\bmod q = 96\\,149\\,360, \\\\
& f({10}^3)\bmod q = 24\\,806\\,056, \\\\ & f({10}^6)\bmod q = 30\\,808\\,124. \end{align}$$
Знайдіть $f({10}^{10000})\bmod 100\\,000\\,007$.

View File

@ -10,11 +10,13 @@ dashedName: problem-330-eulers-number
Нескінченна послідовність дійсних чисел $a(n)$ визначається для усіх цілих чисел $n$ наступним чином:
$$ a(n) = \begin{cases} 1 & n < 0 \\\\ \displaystyle \sum_{i = 1}^{\infty} \frac{a(n - 1)}{i!} & n \ge 0 \end{cases} $$
$$ a(n) = \begin{cases} 1 & n < 0 \\\\
\displaystyle \sum_{i = 1}^{\infty} \frac{a(n - 1)}{i!} & n \ge 0 \end{cases} $$
Наприклад,
$$\begin{align} & a(0) = \frac{1}{1!} + \frac{1}{2!} + \frac{1}{3!} + \ldots = e 1 \\\\ & a(1) = \frac{e 1}{1!} + \frac{1}{2!} + \frac{1}{3!} + \ldots = 2e 3 \\\\ & a(2) = \frac{2e 3}{1!} + \frac{e 1}{2!} + \frac{1}{3!} + \ldots = \frac{7}{2} e 6 \end{align}$$
$$\begin{align} & a(0) = \frac{1}{1!} + \frac{1}{2!} + \frac{1}{3!} + \ldots = e 1 \\\\
& a(1) = \frac{e 1}{1!} + \frac{1}{2!} + \frac{1}{3!} + \ldots = 2e 3 \\\\ & a(2) = \frac{2e 3}{1!} + \frac{e 1}{2!} + \frac{1}{3!} + \ldots = \frac{7}{2} e 6 \end{align}$$
де $e = 2.7182818\ldots$ число Ейлера.

View File

@ -14,7 +14,8 @@ dashedName: problem-333-special-partitions
Для багатьох цілих чисел існує декілька варіантів допустимого поділу, починаючи з 11, котре має два шляхи ділення.
$$\begin{align} & 11 = 2 + 9 = (2^1 \times 3^0 + 2^0 \times 3^2) \\\\ & 11 = 8 + 3 = (2^3 \times 3^0 + 2^0 \times 3^1) \end{align}$$
$$\begin{align} & 11 = 2 + 9 = (2^1 \times 3^0 + 2^0 \times 3^2) \\\\
& 11 = 8 + 3 = (2^3 \times 3^0 + 2^0 \times 3^1) \end{align}$$
Визначимо $P(n)$ як сукупність правильних поділів $n$. Наприклад, $P(11) = 2$.

View File

@ -16,7 +16,10 @@ dashedName: problem-334-spilling-the-beans
Вам надано наступні послідовності:
$$\begin{align} & t_0 = 123456, \\\\ & t_i = \begin{cases} \frac{t_{i - 1}}{2}, & \text{if $t_{i - 1}$ is even} \\\\ \left\lfloor\frac{t_{i - 1}}{2}\right\rfloor \oplus 926252, & \text{if $t_{i - 1}$ is odd} \end{cases} \\\\ & \qquad \text{where $⌊x⌋$ is the floor function and $\oplus$ is the bitwise XOR operator.} \\\\ & b_i = (t_i\bmod 2^{11}) + 1. \end{align}$$
$$\begin{align} & t_0 = 123456, \\\\
& t_i = \begin{cases} \frac{t_{i - 1}}{2}, & \text{if $t_{i - 1}$ is even} \\\\
\left\lfloor\frac{t_{i - 1}}{2}\right\rfloor \oplus 926252, & \text{if $t_{i - 1}$ is odd} \end{cases} \\\\
& \qquad \text{where $⌊x⌋$ is the floor function and $\oplus$ is the bitwise XOR operator.} \\\\ & b_i = (t_i\bmod 2^{11}) + 1. \end{align}$$
Перші дві умови останньої послідовності: $b_1 = 289$ and $b_2 = 145$. Якщо б ми почали з $b_1$ і $b_2$ бобів у двох сусідніх мисках, то нам потрібно було б 3419100 кроків, щоб завершити гру.

View File

@ -10,7 +10,8 @@ dashedName: problem-340-crazy-function
Для фіксованих цілих $a$, $b$, $c$ визначити цю функцію $F(n)$ наступним чином:
$$\begin{align} & F(n) = n - c \\;\text{ for all } n > b \\\\ & F(n) = F(a + F(a + F(a + F(a + n)))) \\;\text{ for all } n ≤ b. \end{align}$$
$$\begin{align} & F(n) = n - c \\;\text{ for all } n > b \\\\
& F(n) = F(a + F(a + F(a + F(a + n)))) \\;\text{ for all } n ≤ b. \end{align}$$
Також визначте $S(a, b, c) = \displaystyle\sum_{n = 0}^b F(n)$.

View File

@ -10,7 +10,8 @@ dashedName: problem-341-golombs-self-describing-sequence
Послідовність Голомба ($G(n)$) є єдиною незменшувальною послідовність натуральних чисел, така що $n$ з'являється рівно $G(n)$ разів у послідовності. Значення $G(n)$ для перших кількох $n$ є
$$\початок{array}{c} n & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & \ldots \\\\ G(n) & 1 & 2 & 2 & 3 & 3 & 4 & 4 & 4 & 5 & 5 & 5 & 6 & 6 & 6 & 6 & \ldots \end{array}$$
$$\початок{array}{c} n & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & \ldots \\\\
G(n) & 1 & 2 & 2 & 3 & 3 & 4 & 4 & 4 & 5 & 5 & 5 & 6 & 6 & 6 & 6 & \ldots \end{array}$$
Вам дано що $G({10}^3) = 86$, $G({10}^6) = 6137$.

View File

@ -12,11 +12,20 @@ dashedName: problem-345-matrix-sum
Наприклад, матрична сума матриці нижче дорівнює $3315 ( = 863 + 383 + 343 + 959 + 767)$:
$$\begin{array}{rrrrr} 7 & 53 & 183 & 439 & \color{lime}{863} \\\\ 497 & \color{lime}{383} & 563 & 79 & 973 \\\\ 287 & 63 & \color{lime}{343} & 169 & 583 \\\\ 627 & 343 & 773 & \color{lime}{959} & 943 \\\\ \color{lime}{767} & 473 & 103 & 699 & 303 \end{array}$$
$$\begin{array}{rrrrr} 7 & 53 & 183 & 439 & \color{lime}{863} \\\\
497 & \color{lime}{383} & 563 & 79 & 973 \\\\ 287 & 63 & \color{lime}{343} & 169 & 583 \\\\
627 & 343 & 773 & \color{lime}{959} & 943 \\\\ \color{lime}{767} & 473 & 103 & 699 & 303 \end{array}$$
Знайдіть матричну суму матриці:
$$\\begin{array}{r} 7 & 53 & 183 & 439 & 863 & 497 & 383 & 563 & 79 & 973 & 287 & 63 & 343 & 169 & 583 \\\\ 627 & 343 & 773 & 959 & 943 & 767 & 473 & 103 & 699 & 303 & 957 & 703 & 583 & 639 & 913 \\\\ 447 & 283 & 463 & 29 & 23 & 487 & 463 & 993 & 119 & 883 & 327 & 493 & 423 & 159 & 743 \\\\ 217 & 623 & 3 & 399 & 853 & 407 & 103 & 983 & 89 & 463 & 290 & 516 & 212 & 462 & 350 \\\\ 960 & 376 & 682 & 962 & 300 & 780 & 486 & 502 & 912 & 800 & 250 & 346 & 172 & 812 & 350 \\\\ 870 & 456 & 192 & 162 & 593 & 473 & 915 & 45 & 989 & 873 & 823 & 965 & 425 & 329 & 803 \\\\ 973 & 965 & 905 & 919 & 133 & 673 & 665 & 235 & 509 & 613 & 673 & 815 & 165 & 992 & 326 \\\\ 322 & 148 & 972 & 962 & 286 & 255 & 941 & 541 & 265 & 323 & 925 & 281 & 601 & 95 & 973 \\\\ 445 & 721 & 11 & 525 & 473 & 65 & 511 & 164 & 138 & 672 & 18 & 428 & 154 & 448 & 848 \\\\ 414 & 456 & 310 & 312 & 798 & 104 & 566 & 520 & 302 & 248 & 694 & 976 & 430 & 392 & 198 \\\\ 184 & 829 & 373 & 181 & 631 & 101 & 969 & 613 & 840 & 740 & 778 & 458 & 284 & 760 & 390 \\\\ 821 & 461 & 843 & 513 & 17 & 901 & 711 & 993 & 293 & 157 & 274 & 94 & 192 & 156 & 574 \\\\ 34 & 124 & 4 & 878 & 450 & 476 & 712 & 914 & 838 & 669 & 875 & 299 & 823 & 329 & 699 \\\\ 815 & 559 & 813 & 459 & 522 & 788 & 168 & 586 & 966 & 232 & 308 & 833 & 251 & 631 & 107 \\\\ 813 & 883 & 451 & 509 & 615 & 77 & 281 & 613 & 459 & 205 & 380 & 274 & 302 & 35 & 805 \end{array}$$
$$\\begin{array}{r} 7 & 53 & 183 & 439 & 863 & 497 & 383 & 563 & 79 & 973 & 287 & 63 & 343 & 169 & 583 \\\\
627 & 343 & 773 & 959 & 943 & 767 & 473 & 103 & 699 & 303 & 957 & 703 & 583 & 639 & 913 \\\\ 447 & 283 & 463 & 29 & 23 & 487 & 463 & 993 & 119 & 883 & 327 & 493 & 423 & 159 & 743 \\\\
217 & 623 & 3 & 399 & 853 & 407 & 103 & 983 & 89 & 463 & 290 & 516 & 212 & 462 & 350 \\\\ 960 & 376 & 682 & 962 & 300 & 780 & 486 & 502 & 912 & 800 & 250 & 346 & 172 & 812 & 350 \\\\
870 & 456 & 192 & 162 & 593 & 473 & 915 & 45 & 989 & 873 & 823 & 965 & 425 & 329 & 803 \\\\ 973 & 965 & 905 & 919 & 133 & 673 & 665 & 235 & 509 & 613 & 673 & 815 & 165 & 992 & 326 \\\\
322 & 148 & 972 & 962 & 286 & 255 & 941 & 541 & 265 & 323 & 925 & 281 & 601 & 95 & 973 \\\\ 445 & 721 & 11 & 525 & 473 & 65 & 511 & 164 & 138 & 672 & 18 & 428 & 154 & 448 & 848 \\\\
414 & 456 & 310 & 312 & 798 & 104 & 566 & 520 & 302 & 248 & 694 & 976 & 430 & 392 & 198 \\\\ 184 & 829 & 373 & 181 & 631 & 101 & 969 & 613 & 840 & 740 & 778 & 458 & 284 & 760 & 390 \\\\
821 & 461 & 843 & 513 & 17 & 901 & 711 & 993 & 293 & 157 & 274 & 94 & 192 & 156 & 574 \\\\ 34 & 124 & 4 & 878 & 450 & 476 & 712 & 914 & 838 & 669 & 875 & 299 & 823 & 329 & 699 \\\\
815 & 559 & 813 & 459 & 522 & 788 & 168 & 586 & 966 & 232 & 308 & 833 & 251 & 631 & 107 \\\\ 813 & 883 & 451 & 509 & 615 & 77 & 281 & 613 & 459 & 205 & 380 & 274 & 302 & 35 & 805 \end{array}$$
# --hints--

View File

@ -14,7 +14,9 @@ dashedName: problem-348-sum-of-a-square-and-a-cube
Наприклад, 5229225 - це паліндромне число, яке можна записати 4 способами:
$$\begin{align} & {2285}^2 + {20}^3 \\\\ & {2223}^2 + {66}^3 \\\\ & {1810}^2 + {125}^3 \\\\ & {1197}^2 + {156}^3 \end{align}$$
$$\begin{align} & {2285}^2 + {20}^3 \\\\
& {2223}^2 + {66}^3 \\\\ & {1810}^2 + {125}^3 \\\\
& {1197}^2 + {156}^3 \end{align}$$
Знайдіть суму п'яти найменших таких паліндромних чисел.

View File

@ -16,7 +16,9 @@ dashedName: problem-350-constraining-the-least-greatest-and-the-greatest-least
$f(G, L, N)$ - це кількість списків розміру $N$ з $gcd ≥ G$ та $lcm ≤ L$. Наприклад:
$$\begin{align} & f(10, 100, 1) = 91 \\\\ & f(10, 100, 2) = 327 \\\\ & f(10, 100, 3) = 1135 \\\\ & f(10, 100, 1000)\bmod {101}^4 = 3\\,286\\,053 \end{align}$$
$$\begin{align} & f(10, 100, 1) = 91 \\\\
& f(10, 100, 2) = 327 \\\\ & f(10, 100, 3) = 1135 \\\\
& f(10, 100, 1000)\bmod {101}^4 = 3\\,286\\,053 \end{align}$$
Знайдіть $f({10}^6, {10}^{12}, {10}^{18})\bmod {101}^4$.

View File

@ -14,11 +14,16 @@ dashedName: problem-358-cyclic-numbers
Найменше циклічне число - це 6-значне число 142857:
$$\begin{align} & 142857 × 1 = 142857 \\\\ & 142857 × 2 = 285714 \\\\ & 142857 × 3 = 428571 \\\\ & 142857 × 4 = 571428 \\\\ & 142857 × 5 = 714285 \\\\ & 142857 × 6 = 857142 \end{align}$$
$$\begin{align} & 142857 × 1 = 142857 \\\\
& 142857 × 2 = 285714 \\\\ & 142857 × 3 = 428571 \\\\
& 142857 × 4 = 571428 \\\\ & 142857 × 5 = 714285 \\\\
& 142857 × 6 = 857142 \end{align}$$
Наступне циклічне число 0588235294117647 на 16 цифр:
$$\begin{align} & 0588235294117647 × 1 = 0588235294117647 \\\\ & 0588235294117647 × 2 = 1176470588235294 \\\\ & 0588235294117647 × 3 = 1764705882352941 \\\\ & \ldots \\\\ & 0588235294117647 × 16 = 9411764705882352 \end{align}$$
$$\begin{align} & 0588235294117647 × 1 = 0588235294117647 \\\\
& 0588235294117647 × 2 = 1176470588235294 \\\\ & 0588235294117647 × 3 = 1764705882352941 \\\\
& \ldots \\\\ & 0588235294117647 × 16 = 9411764705882352 \end{align}$$
Зауважте, що для циклічних чисел важливі нулі на початку.

View File

@ -27,7 +27,10 @@ dashedName: problem-359-hilberts-new-hotel
Визначте $P(f, r)$ як $n$, якщо особа $n$ займає кімнату $r$ на поверсі $f$, та 0, якщо жодна людина не займає кімнату. Ось декілька прикладів:
$$\begin{align} & P(1, 1) = 1 \\\\ & P(1, 2) = 3 \\\\ & P(2, 1) = 2 \\\\ & P(10, 20) = 440 \\\\ & P(25, 75) = 4863 \\\\ & P(99, 100) = 19454 \end{align}$$
$$\begin{align} & P(1, 1) = 1 \\\\
& P(1, 2) = 3 \\\\ & P(2, 1) = 2 \\\\
& P(10, 20) = 440 \\\\ & P(25, 75) = 4863 \\\\
& P(99, 100) = 19454 \end{align}$$
Знайти суму усіх $P(f, r)$ для всіх додатних $f$ і $r$, такі як $f × r = 71\\, 28\\,803\\,586\\,048$ і вказати останні 8 цифр як відповідь.

View File

@ -20,7 +20,8 @@ dashedName: problem-361-subsequence-of-thue-morse-sequence
Перші кілька термінів $A_n$ наведені наступним чином:
$$\begin{array}{cr} n & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & \ldots \\\\ A_n & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 9 & 10 & 11 & 12 & 13 & 18 & \ldots \end{array}$$
$$\begin{array}{cr} n & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & \ldots \\\\
A_n & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 9 & 10 & 11 & 12 & 13 & 18 & \ldots \end{array}$$
Ми також можемо підтвердити, що $A_{100} = 3251$ та $A_{1000} = 80\\,852\\,364\\,498$.

View File

@ -16,7 +16,8 @@ dashedName: problem-368-a-kempner-like-series
20 опущених значень:
$$\dfrac{1}{111}, \dfrac{1}{222}, \dfrac{1}{333}, \dfrac{1}{444}, \dfrac{1}{555}, \dfrac{1}{666}, \dfrac{1}{777}, \dfrac{1}{888}, \dfrac{1}{999}, \dfrac{1}{1000}, \dfrac{1}{1110}, \\\\ \dfrac{1}{1111}, \dfrac{1}{1112}, \dfrac{1}{1113}, \dfrac{1}{1114}, \dfrac{1}{1115}, \dfrac{1}{1116}, \dfrac{1}{1117}, \dfrac{1}{1118}, \dfrac{1}{1119}$$
$$\dfrac{1}{111}, \dfrac{1}{222}, \dfrac{1}{333}, \dfrac{1}{444}, \dfrac{1}{555}, \dfrac{1}{666}, \dfrac{1}{777}, \dfrac{1}{888}, \dfrac{1}{999}, \dfrac{1}{1000}, \dfrac{1}{1110}, \\\\
\dfrac{1}{1111}, \dfrac{1}{1112}, \dfrac{1}{1113}, \dfrac{1}{1114}, \dfrac{1}{1115}, \dfrac{1}{1116}, \dfrac{1}{1117}, \dfrac{1}{1118}, \dfrac{1}{1119}$$
Ця послідовність також сходиться.

View File

@ -10,7 +10,8 @@ dashedName: problem-375-minimum-of-subsequences
Нехай $S_n$ буде цілочисельною послідовністю, створеною за допомогою такого генератора псевдовипадкових чисел:
$$\begin{align} S_0 & = 290\\,797 \\\\ S_{n + 1} & = {S_n}^2\bmod 50\\,515\\,093 \end{align}$$
$$\begin{align} S_0 & = 290\\,797 \\\\
S_{n + 1} & = {S_n}^2\bmod 50\\,515\\,093 \end{align}$$
Нехай $A(i, j)$ буде мінімальним з чисел $S_i, S_{i + 1}, \ldots, S_j$ for $i ≤ j$. Нехай $M(N) = \sum A(i, j)$ для $1 ≤ i ≤ j ≤ N$.

View File

@ -10,7 +10,9 @@ dashedName: problem-376-nontransitive-sets-of-dice
Розглянемо такий набір кубиків з нетиповою розміткою:
$$\begin{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 \\\\ \end{array}$$
$$\begin{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 \\\\
\end{array}$$
За правилами гри, двоє гравців по черзі підкидують гральний кубик. Переможцем стає той, чий кубик показав найвище значення.

View File

@ -10,7 +10,9 @@ dashedName: problem-38-pandigital-multiples
Візьміть число 192 і помножте його на 1, 2 і 3:
$$\begin{align} 192 × 1 = 192\\\\ 192 × 2 = 384\\\\ 192 × 3 = 576\\\\ \end{align}$$
$$\begin{align} 192 × 1 = 192\\\\
192 × 2 = 384\\\\ 192 × 3 = 576\\\\
\end{align}$$
Об'єднавши кожний добуток, ми отримаємо панцифрове число від 1 до 9 - 192384576. Назвемо отримане число 192384576 об'єднаним добутком 192 і (1, 2, 3).

View File

@ -18,7 +18,9 @@ dashedName: problem-384-rudin-shapiro-sequence
Перші декілька значень цих послідовностей:
$$\begin{array}{lr} n & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\\ a(n) & 0 & 0 & 0 & 1 & 0 & 0 & 1 & 2 \\\\ b(n) & 1 & 1 & 1 & -1 & 1 & 1 & -1 & 1 \\\\ s(n) & 1 & 2 & 3 & 2 & 3 & 4 & 3 & 4 \end{array}$$
$$\begin{array}{lr} n & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\\
a(n) & 0 & 0 & 0 & 1 & 0 & 0 & 1 & 2 \\\\ b(n) & 1 & 1 & 1 & -1 & 1 & 1 & -1 & 1 \\\\
s(n) & 1 & 2 & 3 & 2 & 3 & 4 & 3 & 4 \end{array}$$
Послідовність $s(n)$ має особливу властивість, коли усі її елементи позитивні, а кожне позитивне ціле число $k$ виникає рівно $k$ разів.
@ -28,7 +30,8 @@ $$\begin{array}{lr} n & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\\ a(n) & 0 & 0 & 0
Нехай $F(n)$ буде послідовністю Фібоначчі, що визначається наступним:
$$\begin{align} & F(0) = F(1) = 1 \text{ and} \\\\ & F(n) = F(n - 1) + F(n - 2) \text{ for } n > 1. \end{align}$$
$$\begin{align} & F(0) = F(1) = 1 \text{ and} \\\\
& F(n) = F(n - 1) + F(n - 2) \text{ for } n > 1. \end{align}$$
Визначити $GF(t) = g(F(t), F(t - 1))$.

View File

@ -32,7 +32,9 @@ dashedName: problem-406-guessing-game
Ось декілька прикладів:
$$\begin{align} & C(5, 2, 3) = 5 \\\\ & C(500, \sqrt{2}, \sqrt{3}) = 13.220\\,731\\,97\ldots \\\\ & C(20\\,000, 5, 7) = 82 \\\\ & C(2\\,000\\,000, √5, √7) = 49.637\\,559\\,55\ldots \\\\ \end{align}$$
$$\begin{align} & C(5, 2, 3) = 5 \\\\
& C(500, \sqrt{2}, \sqrt{3}) = 13.220\\,731\\,97\ldots \\\\ & C(20\\,000, 5, 7) = 82 \\\\
& C(2\\,000\\,000, √5, √7) = 49.637\\,559\\,55\ldots \\\\ \end{align}$$
Нехай $F_k$ буде цифрами фібоначчі: $F_k = F_{k - 1} + F_{k - 2}$ з базовими кешами $F_1 = F_2 = 1$.

View File

@ -16,7 +16,8 @@ dashedName: problem-414-kaprekar-constant
Наприклад, почнемо з числа 0837:
$$\begin{align} & 8730 - 0378 = 8352 \\\\ & 8532 - 2358 = 6174 \end{align}$$
$$\begin{align} & 8730 - 0378 = 8352 \\\\
& 8532 - 2358 = 6174 \end{align}$$
6174 називається сталою Капрекара. Сортування цифр, віднімання та повторення цього процесу поки не отримаємо 0 або сталу Капрекара, називається перетворенням Капрекара.

View File

@ -10,7 +10,12 @@ dashedName: problem-417-reciprocal-cycles-ii
Одиничний дріб містить 1 в чисельнику. Десяткове представлення дробів зі знаменниками від 2 до 10:
$$\begin{align} & \frac{1}{2} = 0.5 \\\\ & \frac{1}{3} = 0.(3) \\\\ & \frac{1}{4} = 0.25 \\\\ & \frac{1}{5} = 0.2 \\\\ & \frac{1}{6} = 0.1(6) \\\\ & \frac{1}{7} = 0.(142857) \\\\ & \frac{1}{8} = 0.125 \\\\ & \frac{1}{9} = 0.(1) \\\\ & \frac{1}{10} = 0.1 \\\\ \end{align}$$
$$\begin{align} & \frac{1}{2} = 0.5 \\\\
& \frac{1}{3} = 0.(3) \\\\ & \frac{1}{4} = 0.25 \\\\
& \frac{1}{5} = 0.2 \\\\ & \frac{1}{6} = 0.1(6) \\\\
& \frac{1}{7} = 0.(142857) \\\\ & \frac{1}{8} = 0.125 \\\\
& \frac{1}{9} = 0.(1) \\\\ & \frac{1}{10} = 0.1 \\\\
\end{align}$$
Де 0.1(6) означає 0.166666... і має послідовність з однієї цифри, що повторюється. Бачимо, що $\frac{1}{7}$ має послідовність із 6 цифр, що повторюються.

View File

@ -12,11 +12,14 @@ dashedName: problem-420-2x2-positive-integer-matrix
Деякі матриці натуральних чисел можуть бути виражені у вигляді квадрата матриці натуральних чисел двома різними способами. Наприклад:
$$\begin{pmatrix} 40 & 12 \\\\ 48 & 40 \end{pmatrix} =
$$\begin{pmatrix} 40 & 12 \\\\
48 & 40 \end{pmatrix} =
{\begin{pmatrix}
2 & 3 \\\\ 12 & 2 \end{pmatrix}}^2 =
2 & 3 \\\\
12 & 2 \end{pmatrix}}^2 =
{\begin{pmatrix}
6 & 1 \\\\ 4 & 6 \end{pmatrix}}^2$$
6 & 1 \\\\
4 & 6 \end{pmatrix}}^2$$
Визначаємо $F (N)$ як кількість матриць натуральних чисел 2x2, які мають слід менше N, і які можуть бути виражені у вигляді квадрата натурального числа матриці двома різними способами.

View File

@ -14,7 +14,8 @@ dashedName: problem-423-consecutive-die-throws
Наприклад, якщо $n = 7$ і значення кидків кубика є (1, 5, 6, 6, 6, 3), тоді наступні кидки поспіль дають однакове значення:
$$\begin{align} & (\underline{1}, \underline{1}, 5, 6, 6, 6, 3) \\\\ & (1, 1, 5, \underline{6}, \underline{6}, 6, 3) \\\\ & (1, 1, 5, 6, \underline{6}, \underline{6}, 3) \end{align}$$
$$\begin{align} & (\underline{1}, \underline{1}, 5, 6, 6, 6, 3) \\\\
& (1, 1, 5, \underline{6}, \underline{6}, 6, 3) \\\\ & (1, 1, 5, 6, \underline{6}, \underline{6}, 3) \end{align}$$
Таким чином, $c = 3$ за (1, 5, 6, 6, 3).

View File

@ -24,7 +24,8 @@ dashedName: problem-426-box-ball-system
Ми визначили послідовність $\\{t_i\\}$:
$$\begin{align} & s_0 = 290\\,797 \\\\ & s_{k + 1} = {s_k}^2\bmod 50\\,515\\,093 \\\\ & t_k = (s_k\bmod 64) + 1 \end{align}$$
$$\begin{align} & s_0 = 290\\,797 \\\\
& s_{k + 1} = {s_k}^2\bmod 50\\,515\\,093 \\\\ & t_k = (s_k\bmod 64) + 1 \end{align}$$
Починаючи з початкової конфігурації $(t_0, t_1, \ldots, t_{10})$, кінцевим станом стане [1, 3, 10, 24, 51, 75].

View File

@ -10,7 +10,8 @@ dashedName: problem-433-steps-in-euclids-algorithm
Нехай $E(x_0, y_0)$ є кількістю кроків, необхідних для визначення найбільшого спільного дільника для $x_0$ та $y_0$ з алгоритмом Евкліда. Більш формально:
$$\begin{align} & x_1 = y_0, y_1 = x_0\bmod y_0 \\\\ & x_n = y_{n - 1}, y_n = x_{n - 1}\bmod y_{n - 1} \end{align}$$
$$\begin{align} & x_1 = y_0, y_1 = x_0\bmod y_0 \\\\
& x_n = y_{n - 1}, y_n = x_{n - 1}\bmod y_{n - 1} \end{align}$$
$E(x_0, y_0)$ є найменшим $n$ так, щоб $y_n = 0$.

View File

@ -16,7 +16,11 @@ dashedName: problem-437-fibonacci-primitive-roots
Якщо розглянути детальніше, то:
$$\begin{align} & 1 + 8 = 9 \\\\ & 8 + 9 = 17 ≡ 6\bmod 11 \\\\ & 9 + 6 = 15 ≡ 4\bmod 11 \\\\ & 6 + 4 = 10 \\\\ & 4 + 10 = 14 ≡ 3\bmod 11 \\\\ & 10 + 3 = 13 ≡ 2\bmod 11 \\\\ & 3 + 2 = 5 \\\\ & 2 + 5 = 7 \\\\ & 5 + 7 = 12 ≡ 1\bmod 11. \end{align}$$
$$\begin{align} & 1 + 8 = 9 \\\\
& 8 + 9 = 17 ≡ 6\bmod 11 \\\\ & 9 + 6 = 15 ≡ 4\bmod 11 \\\\
& 6 + 4 = 10 \\\\ & 4 + 10 = 14 ≡ 3\bmod 11 \\\\
& 10 + 3 = 13 ≡ 2\bmod 11 \\\\ & 3 + 2 = 5 \\\\
& 2 + 5 = 7 \\\\ & 5 + 7 = 12 ≡ 1\bmod 11. \end{align}$$
Тож степінь з 8 модуля 11 є циклічним в 10 періоді, а $8^n + 8^{n + 1} ≡ 8^{n + 2} (\text{mod } 11)$. Число 8 називають простим коренем Фібоначчі для 11.

View File

@ -24,7 +24,8 @@ dashedName: problem-440-gcd-and-tiling
Наприклад:
$$\begin{align} & S(2) = 10\\,444 \\\\ & S(3) = 1\\,292\\,115\\,238\\,446\\,807\\,016\\,106\\,539\\,989 \\\\ & S(4)\bmod 987\\,898\\,789 = 670\\,616\\,280. \end{align}$$
$$\begin{align} & S(2) = 10\\,444 \\\\
& S(3) = 1\\,292\\,115\\,238\\,446\\,807\\,016\\,106\\,539\\,989 \\\\ & S(4)\bmod 987\\,898\\,789 = 670\\,616\\,280. \end{align}$$
Знайдіть $S(2000)\bmod 987\\,898\\,789$.

View File

@ -10,11 +10,13 @@ dashedName: problem-443-gcd-sequence
Нехай $g(n)$ — це послідовність, яка визначається так:
$$\begin{align} & g(4) = 13, \\\\ & g(n) = g(n-1) + gcd(n, g(n - 1)) \text{ for } n > 4. \end{align}$$
$$\begin{align} & g(4) = 13, \\\\
& g(n) = g(n-1) + gcd(n, g(n - 1)) \text{ for } n > 4. \end{align}$$
Перші кілька значень:
$$\begin{array}{l} n & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 & \ldots \\\\ g(n) & 13 & 14 & 16 & 17 & 18 & 27 & 28 & 29 & 30 & 31 & 32 & 33 & 34 & 51 & 54 & 55 & 60 & \ldots \end{array}$$
$$\begin{array}{l} n & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 & \ldots \\\\
g(n) & 13 & 14 & 16 & 17 & 18 & 27 & 28 & 29 & 30 & 31 & 32 & 33 & 34 & 51 & 54 & 55 & 60 & \ldots \end{array}$$
Дано, що $g(1\\,000) = 2\\,524$, а $g(1\\,000\\,000) = 2\\,624\\,152$.

View File

@ -14,7 +14,10 @@ dashedName: problem-451-modular-inverses
Числа 1, 8, 4, 13, 2, 11, 7, 14 є оберненими за модулем 15, оскільки
$$\begin{align} & 1 \times 1\bmod 15 = 1 \\\\ & 2 \times 8 = 16\bmod 15 = 1 \\\\ & 4 \times 4 = 16\bmod 15 = 1 \\\\ & 7 \times 13 = 91\bmod 15 = 1 \\\\ & 11 \times 11 = 121\bmod 15 = 1 \\\\ & 14 \times 14 = 196\bmod 15 = 1 \end{align}$$
$$\begin{align} & 1 \times 1\bmod 15 = 1 \\\\
& 2 \times 8 = 16\bmod 15 = 1 \\\\ & 4 \times 4 = 16\bmod 15 = 1 \\\\
& 7 \times 13 = 91\bmod 15 = 1 \\\\ & 11 \times 11 = 121\bmod 15 = 1 \\\\
& 14 \times 14 = 196\bmod 15 = 1 \end{align}$$
Нехай $I(n)$ — це найбільше додатне число $m$, менше за $n - 1$, при якому обернене за модулем число $m$ з модулем $n$ дорівнює цьому ж числу $m$.

View File

@ -12,7 +12,9 @@ dashedName: problem-455-powers-with-trailing-digits
Наприклад:
$$\begin{align} & f(4) = 411\\,728\\,896 (4^{411\\,728\\,896} = . ..490\underline{411728896}) \\\\ & f(10) = 0 \\\\ & f(157) = 743\\,757 (157^{743\\,757} = ...567\underline{000743757}) \\\\ & Σf(n), 2 ≤ n ≤ 103 = 442\\,530\\,011\\,399 \end{align}$$
$$\begin{align} & f(4) = 411\\,728\\,896 (4^{411\\,728\\,896} = . ..490\underline{411728896}) \\\\
& f(10) = 0 \\\\ & f(157) = 743\\,757 (157^{743\\,757} = ...567\underline{000743757}) \\\\
& Σf(n), 2 ≤ n ≤ 103 = 442\\,530\\,011\\,399 \end{align}$$
Знайдіть $\sum f(n)$, $2 ≤ n ≤ {10}^6$.

View File

@ -10,7 +10,8 @@ dashedName: problem-456-triangles-containing-the-origin-ii
Визначте:
$$\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}$$
$$\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}$$
Наприклад, $$P_8 = \\{(-14913, -6630), (-10161, 5625), (5226, 11896), (8340, -10778), (15852, -5203), (-15165, 11295), (-1427, -14495), (12407, 1060)\\}$$
@ -18,7 +19,8 @@ $$\begin{align} & x_n = ({1248}^n\bmod 32323) - 16161 \\\\ & y_n = ({8421}^n\bmo
Наприклад:
$$\begin{align} & C(8) = 20 \\\\ & C(600) = 8\\,950\\,634 \\\\ & C(40\\,000) = 2\\,666\\,610\\,948\\,988 \end{align}$$
$$\begin{align} & C(8) = 20 \\\\
& C(600) = 8\\,950\\,634 \\\\ & C(40\\,000) = 2\\,666\\,610\\,948\\,988 \end{align}$$
Знайдіть $C(2\\,000\\,000)$.

Some files were not shown because too many files have changed in this diff Show More