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

This commit is contained in:
camperbot
2022-04-02 14:16:30 +05:30
committed by GitHub
parent f7afac00a6
commit 40a6abe1b0
104 changed files with 4316 additions and 108 deletions

View File

@ -0,0 +1,183 @@
---
id: 5f46e270702a8456a664f0df
title: Step 86
challengeType: 0
dashedName: step-86
---
# --description--
Per rimuovere parte dello spazio verticale tra l'elemento `h1` e il testo `Est. 2020`, modifica il margine inferiore dell'elemento `h1` impostandolo a `15px`.
# --hints--
Dovresti impostare la proprietà `margin-bottom` su `15px`.
```js
const hasMarginBottom = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['margin-bottom'] === '15px');
assert(hasMarginBottom);
```
Il tuo elemento `h1` dovrebbe avere un `margin-bottom` di `15px`.
```js
const h1MarginBottom = new __helpers.CSSHelp(document).getStyle('h1')?.getPropertyValue('margin-bottom');
assert(h1MarginBottom === '15px');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cafe Menu</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="menu">
<header>
<h1>CAMPER CAFE</h1>
<p class="established">Est. 2020</p>
</header>
<hr>
<main>
<section>
<h2>Coffee</h2>
<article class="item">
<p class="flavor">French Vanilla</p><p class="price">3.00</p>
</article>
<article class="item">
<p class="flavor">Caramel Macchiato</p><p class="price">3.75</p>
</article>
<article class="item">
<p class="flavor">Pumpkin Spice</p><p class="price">3.50</p>
</article>
<article class="item">
<p class="flavor">Hazelnut</p><p class="price">4.00</p>
</article>
<article class="item">
<p class="flavor">Mocha</p><p class="price">4.50</p>
</article>
</section>
<section>
<h2>Desserts</h2>
<article class="item">
<p class="dessert">Donut</p><p class="price">1.50</p>
</article>
<article class="item">
<p class="dessert">Cherry Pie</p><p class="price">2.75</p>
</article>
<article class="item">
<p class="dessert">Cheesecake</p><p class="price">3.00</p>
</article>
<article class="item">
<p class="dessert">Cinnamon Roll</p><p class="price">2.50</p>
</article>
</section>
</main>
<hr class="bottom-line">
<footer>
<p>
<a href="https://www.freecodecamp.org" target="_blank">Visit our website</a>
</p>
<p>123 Free Code Camp Drive</p>
</footer>
</div>
</body>
<html>
```
```css
body {
background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg);
font-family: sans-serif;
padding: 20px;
}
--fcc-editable-region--
h1 {
font-size: 40px;
margin-top: 0;
}
--fcc-editable-region--
h2 {
font-size: 30px;
}
.established {
font-style: italic;
}
h1, h2, p {
text-align: center;
}
.menu {
width: 80%;
background-color: burlywood;
margin-left: auto;
margin-right: auto;
padding: 20px;
max-width: 500px;
}
hr {
height: 2px;
background-color: brown;
border-color: brown;
}
.bottom-line {
margin-top: 25px;
}
h1, h2 {
font-family: Impact, serif;
}
.item p {
display: inline-block;
margin-top: 5px;
margin-bottom: 5px;
font-size: 18px;
}
.flavor, .dessert {
text-align: left;
width: 75%;
}
.price {
text-align: right;
width: 25%
}
/* FOOTER */
footer {
font-size: 14px;
}
a {
color: black;
}
a:visited {
color: black;
}
a:hover {
color: brown;
}
a:active {
color: brown;
}
```

View File

@ -0,0 +1,304 @@
---
id: 6169b284950e171d8d0bb16a
title: Step 29
challengeType: 0
dashedName: step-29
---
# --description--
Infine, crea un nuovo selettore `75%` tra i tuoi selettori `50%` e `100%`. Dai a questo nuovo selettore una proprietà `background-color` impostata su `yellow.`
Con questo, la tua animazione è molto più fluida e la ruota panoramica è completa.
# --hints--
Dovresti creare un nuovo selettore `75%` nella tua regola `@keyframes cabins`.
```js
const rules = new __helpers.CSSHelp(document).getCSSRules('keyframes')?.[1]?.cssRules;
assert(rules?.[0]?.keyText === '75%' || rules?.[1]?.keyText === '75%' || rules?.[2]?.keyText === '75%' || rules?.[3]?.keyText === '75%' || rules?.[4]?.keyText === '75%');
```
Il tuo selettore `75%` dovrebbe essere compreso tra i selettori `50%` e `100%`.
```js
assert(new __helpers.CSSHelp(document).getCSSRules('keyframes')?.[1]?.cssRules?.[3]?.keyText === '75%');
```
Il tuo selettore `75%` dovrebbe avere una proprietà `background-color` impostata a `yellow`.
```js
assert(new __helpers.CSSHelp(document).getCSSRules('keyframes')?.[1]?.cssRules?.[3]?.style?.backgroundColor === 'yellow');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Ferris Wheel</title>
<link rel="stylesheet" href="./styles.css">
</head>
<body>
<div class="wheel">
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<div class="cabin"></div>
<div class="cabin"></div>
<div class="cabin"></div>
<div class="cabin"></div>
<div class="cabin"></div>
<div class="cabin"></div>
</div>
</body>
</html>
```
```css
.wheel {
border: 2px solid black;
border-radius: 50%;
margin-left: 50px;
position: absolute;
height: 55vw;
width: 55vw;
max-width: 500px;
max-height: 500px;
animation-name: wheel;
animation-duration: 10s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
.line {
background-color: black;
width: 50%;
height: 2px;
position: absolute;
top: 50%;
left: 50%;
transform-origin: 0% 0%;
}
.line:nth-of-type(2) {
transform: rotate(60deg);
}
.line:nth-of-type(3) {
transform: rotate(120deg);
}
.line:nth-of-type(4) {
transform: rotate(180deg);
}
.line:nth-of-type(5) {
transform: rotate(240deg);
}
.line:nth-of-type(6) {
transform: rotate(300deg);
}
.cabin {
background-color: red;
width: 20%;
height: 20%;
position: absolute;
border: 2px solid;
transform-origin: 50% 0%;
animation: cabins 10s ease-in-out infinite;
}
.cabin:nth-of-type(1) {
right: -8.5%;
top: 50%;
}
.cabin:nth-of-type(2) {
right: 17%;
top: 93.5%;
}
.cabin:nth-of-type(3) {
right: 67%;
top: 93.5%;
}
.cabin:nth-of-type(4) {
left: -8.5%;
top: 50%;
}
.cabin:nth-of-type(5) {
left: 17%;
top: 7%;
}
.cabin:nth-of-type(6) {
right: 17%;
top: 7%;
}
@keyframes wheel {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
--fcc-editable-region--
@keyframes cabins {
0% {
transform: rotate(0deg);
}
25% {
background-color: yellow;
}
50% {
background-color: purple;
}
100% {
transform: rotate(-360deg);
}
}
--fcc-editable-region--
```
## --solutions--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Ferris Wheel</title>
<link rel="stylesheet" href="./styles.css">
</head>
<body>
<div class="wheel">
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<div class="cabin"></div>
<div class="cabin"></div>
<div class="cabin"></div>
<div class="cabin"></div>
<div class="cabin"></div>
<div class="cabin"></div>
</div>
</body>
</html>
```
```css
.wheel {
border: 2px solid black;
border-radius: 50%;
margin-left: 50px;
position: absolute;
height: 55vw;
width: 55vw;
max-width: 500px;
max-height: 500px;
animation-name: wheel;
animation-duration: 10s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
.line {
background-color: black;
width: 50%;
height: 2px;
position: absolute;
top: 50%;
left: 50%;
transform-origin: 0% 0%;
}
.line:nth-of-type(2) {
transform: rotate(60deg);
}
.line:nth-of-type(3) {
transform: rotate(120deg);
}
.line:nth-of-type(4) {
transform: rotate(180deg);
}
.line:nth-of-type(5) {
transform: rotate(240deg);
}
.line:nth-of-type(6) {
transform: rotate(300deg);
}
.cabin {
background-color: red;
width: 20%;
height: 20%;
position: absolute;
border: 2px solid;
transform-origin: 50% 0%;
animation: cabins 10s ease-in-out infinite;
}
.cabin:nth-of-type(1) {
right: -8.5%;
top: 50%;
}
.cabin:nth-of-type(2) {
right: 17%;
top: 93.5%;
}
.cabin:nth-of-type(3) {
right: 67%;
top: 93.5%;
}
.cabin:nth-of-type(4) {
left: -8.5%;
top: 50%;
}
.cabin:nth-of-type(5) {
left: 17%;
top: 7%;
}
.cabin:nth-of-type(6) {
right: 17%;
top: 7%;
}
@keyframes wheel {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes cabins {
0% {
transform: rotate(0deg);
}
25% {
background-color: yellow;
}
50% {
background-color: purple;
}
75% {
background-color: yellow;
}
100% {
transform: rotate(-360deg);
}
}
```

View File

@ -0,0 +1,195 @@
---
id: 6143bb50e8e48c6f5ef9d8d5
title: Step 21
challengeType: 0
dashedName: step-21
---
# --description--
All'interno dell'elemento `aside`, crea due elementi `img`, un elemento `blockquote` e un terzo elemento `img`. Dai all'elemento `blockquote` una `class` impostata su `image-quote`.
# --hints--
Dovresti creare tre elementi `img` all'interno del tuo elemento `aside`.
```js
assert(document.querySelectorAll('aside img')?.length === 3);
```
Dovresti creare un elemento `blockquote` all'interno dell'elemento `aside`.
```js
assert.exists(document.querySelector('aside blockquote'));
```
Il tuo elemento `blockquote` dovrebbe avere la `class` impostata su `image-quote`.
```js
assert(document.querySelector('aside blockquote')?.classList?.contains('image-quote'));
```
I tuoi tag html dovrebbero essere nell'ordine corretto.
```js
const children = document.querySelector('aside')?.children;
assert(children?.[0]?.localName === 'img');
assert(children?.[1]?.localName === 'img');
assert(children?.[2]?.localName === 'blockquote');
assert(children?.[3]?.localName === 'img');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Magazine</title>
<link
href="https://fonts.googleapis.com/css?family=Anton|Baskervville|Raleway&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
/>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<main>
<section class="heading">
<header class="hero">
<img
src="https://cdn.freecodecamp.org/platform/universal/fcc_meta_1920X1080-indigo.png"
alt="freecodecamp logo"
loading="lazy"
class="hero-img"
width="400"
/>
<h1 class="hero-title">OUR NEW CURRICULUM</h1>
<p class="hero-subtitle">
Our efforts to restructure our curriculum with a more project-based
focus
</p>
</header>
<div class="author">
<p class="author-name">
By
<a href="https://freecodecamp.org" target="_blank" rel="noreferrer"
>freeCodeCamp</a
>
</p>
<p class="publish-date">March 7, 2019</p>
</div>
<div class="social-icons">
<a href="https://www.facebook.com/freecodecamp/">
<i class="fab fa-facebook-f"></i>
</a>
<a href="https://twitter.com/freecodecamp/">
<i class="fab fa-twitter"></i>
</a>
<a href="https://instagram.com/freecodecamp">
<i class="fab fa-instagram"></i>
</a>
<a href="https://www.linkedin.com/school/free-code-camp/">
<i class="fab fa-linkedin-in"></i>
</a>
<a href="https://www.youtube.com/freecodecamp">
<i class="fab fa-youtube"></i>
</a>
</div>
</section>
<section class="text">
<p class="first-paragraph">
Soon the freeCodeCamp curriculum will be 100% project-driven learning. Instead of a series of coding challenges, you'll learn through building projects - step by step. Before we get into the details, let me emphasize: we are not changing the certifications. All 6 certifications will still have the same 5 required projects. We are only changing the optional coding challenges.
</p>
<p>
After years - years - of pondering these two problems and how to solve them, I slipped, hit my head on the sink, and when I came to I had a revelation! A vision! A picture in my head! A picture of this! This is what makes time travel possible: the flux capacitor!
</p>
<p>
It wasn't as dramatic as Doc's revelation in Back to the Future. It
just occurred to me while I was going for a run. The revelation: the entire curriculum should be a series of projects. Instead of individual coding challenges, we'll just have projects, each with their own seamless series of tests. Each test gives you just enough information to figure out how to get it to pass. (And you can view hints if that isn't enough.)
</p>
<blockquote>
<hr />
<p class="quote">
The entire curriculum should be a series of projects
</p>
<hr />
</blockquote>
<p>
No more walls of explanatory text. No more walls of tests. Just one
test at a time, as you build up a working project. Over the course of passing thousands of tests, you build up projects and your own understanding of coding fundamentals. There is no transition between lessons and projects, because the lessons themselves are baked into projects. And there's plenty of repetition to help you retain everything because - hey - building projects in real life has plenty of repetition.
</p>
<p>
The main design challenge is taking what is currently paragraphs of explanation and instructions and packing them into a single test description text. Each project will involve dozens of tests like this. People will be coding the entire time, rather than switching back and forth from "reading mode" to "coding mode".
</p>
<p>
Instead of a series of coding challenges, people will be in their code editor passing one test after another, quickly building up a project. People will get into a real flow state, similar to what they experience when they build the required projects at the end of each certification. They'll get that sense of forward progress right from the beginning. And freeCodeCamp will be a much smoother experience.
</p>
</section>
<section class="text text-with-images">
<article class="brief-history">
<h3 class="list-title">A Brief History</h3>
<p>Of the Curriculum</p>
<ul class="lists">
<li>
<h4 class="list-subtitle">V1 - 2014</h4>
<p>
We launched freeCodeCamp with a simple list of 15 resources,
including Harvard's CS50 and Stanford's Database Class.
</p>
</li>
<li>
<h4 class="list-subtitle">V2 - 2015</h4>
<p>We added interactive algorithm challenges.</p>
</li>
<li>
<h4 class="list-subtitle">V3 - 2015</h4>
<p>
We added our own HTML+CSS challenges (before we'd been relying
on General Assembly's Dash course for these).
</p>
</li>
<li>
<h4 class="list-subtitle">V4 - 2016</h4>
<p>
We expanded the curriculum to 3 certifications, including Front
End, Back End, and Data Visualization. They each had 10 required
projects, but only the Front End section had its own challenges.
For the other certs, we were still using external resources like
Node School.
</p>
</li>
<li>
<h4 class="list-subtitle">V5 - 2017</h4>
<p>We added the back end and data visualization challenges.</p>
</li>
<li>
<h4 class="list-subtitle">V6 - 2018</h4>
<p>
We launched 6 new certifications to replace our old ones. This
was the biggest curriculum improvement to date.
</p>
</li>
</ul>
</article>
--fcc-editable-region--
<aside class="image-wrapper">
</aside>
--fcc-editable-region--
</section>
</main>
</body>
</html>
```
```css
```

View File

@ -0,0 +1,89 @@
---
id: 61969c487ced6f12db8fef94
title: Step 14
challengeType: 0
dashedName: step-14
---
# --description--
Seleziona l'elemento `.left-mountain` e imposta la sua `width` e `height` a `300px`. Quindi, imposta il `background` su un gradiente lineare che parta da `rgb(203, 241, 228)` e finisca a `rgb(80, 183, 255)`.
# --hints--
Dovresti utilizzare il selettore `.left-mountain`.
```js
assert.match(code, /\.left-mountain\s*\{/);
```
Dovresti dare a `.left-mountain` una `width` di `300px`. `--fcc-actual--` doveva essere `--fcc-expected--`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('.left-mountain')?.width, '300px');
```
Dovresti dare a `.left-mountain` un'`height` di `300px`. `--fcc-actual--` doveva essere `--fcc-expected--`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('.left-mountain')?.height, '300px');
```
Dovresti dare a `.left-mountain` un `background` di `linear-gradient(rgb(203, 241, 228), rgb(80, 183, 255))`.
```js
assert.include(['linear-gradient(rgb(203,241,228),rgb(80,183,255))', 'rgba(0,0,0,0)linear-gradient(rgb(203,241,228),rgb(80,183,255))repeatscroll0%0%'], new __helpers.CSSHelp(document).getStyle('.left-mountain')?.getPropVal('background', true));
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href="./styles.css" />
<title>Penguin</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div class="left-mountain"></div>
<div class="penguin"></div>
<div class="ground"></div>
</body>
</html>
```
```css
body {
background: linear-gradient(45deg, rgb(118, 201, 255), rgb(247, 255, 222));
margin: 0;
padding: 0;
width: 100%;
height: 100vh;
overflow: clip;
}
--fcc-editable-region--
--fcc-editable-region--
.penguin {
width: 300px;
height: 300px;
margin: auto;
margin-top: 75px;
}
.ground {
width: 100vw;
height: 400px;
background: linear-gradient(90deg, rgb(88, 175, 236), rgb(182, 255, 255));
z-index: 3;
position: absolute;
}
```

View File

@ -0,0 +1,166 @@
---
id: 619be946958c6009844f1dee
title: Step 44
challengeType: 0
dashedName: step-44
---
# --description--
Avvia il volto del pinguino, aggiungendo due elementi `div` all'interno di `.penguin-head`, e dando a entrambi una `class` di `face`.
# --hints--
Dovresti aggiungere `--fcc-expected--` `div` elementi a `.penguin-head`, ma è stato trovato `--fcc-actual--`.
```js
assert.equal(document.querySelectorAll('.penguin-head > div')?.length, 2);
```
Dovresti dare al primo `div` una `class` di `face`, ma è stato trovato `--fcc-actual--`.
```js
assert.include(document.querySelector('.penguin-head > div:nth-of-type(1)')?.className, 'face');
```
Dovresti dare al secondo `div` una `class` di `face`, ma è stato trovato `--fcc-actual--`.
```js
assert.include(document.querySelector('.penguin-head > div:nth-of-type(2)')?.className, 'face');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href="./styles.css" />
<title>Penguin</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div class="left-mountain"></div>
<div class="back-mountain"></div>
<div class="sun"></div>
<div class="penguin">
--fcc-editable-region--
<div class="penguin-head">
</div>
--fcc-editable-region--
<div class="penguin-body"></div>
</div>
<div class="ground"></div>
</body>
</html>
```
```css
body {
background: linear-gradient(45deg, rgb(118, 201, 255), rgb(247, 255, 222));
margin: 0;
padding: 0;
width: 100%;
height: 100vh;
overflow: clip;
}
.left-mountain {
width: 300px;
height: 300px;
background: linear-gradient(rgb(203, 241, 228), rgb(80, 183, 255));
position: absolute;
transform: skew(0deg, 44deg);
z-index: 2;
margin-top: 100px;
}
.back-mountain {
width: 300px;
height: 300px;
background: linear-gradient(rgb(203, 241, 228), rgb(47, 170, 255));
position: absolute;
z-index: 1;
transform: rotate(45deg);
left: 110px;
top: 225px;
}
.sun {
width: 200px;
height: 200px;
background-color: yellow;
position: absolute;
border-radius: 50%;
top: -75px;
right: -75px;
}
.penguin {
width: 300px;
height: 300px;
margin: auto;
margin-top: 75px;
z-index: 4;
position: relative;
}
.penguin * {
position: absolute;
}
.penguin-head {
width: 50%;
height: 45%;
background: linear-gradient(
45deg,
gray,
rgb(239, 240, 228)
);
border-radius: 70% 70% 65% 65%;
top: 10%;
left: 25%;
z-index: 1;
}
.penguin-body {
width: 53%;
height: 45%;
background: linear-gradient(
45deg,
rgb(134, 133, 133) 0%,
rgb(234, 231, 231) 25%,
white 67%
);
border-radius: 80% 80% 100% 100%;
top: 40%;
left: 23.5%;
}
.penguin-body::before {
content: "";
position: absolute;
width: 50%;
height: 45%;
background-color: gray;
top: 10%;
left: 25%;
border-radius: 0% 0% 100% 100%;
opacity: 70%;
}
.ground {
width: 100vw;
height: 400px;
background: linear-gradient(90deg, rgb(88, 175, 236), rgb(182, 255, 255));
z-index: 3;
position: absolute;
margin-top: -58px;
}
```

View File

@ -0,0 +1,225 @@
---
id: 619d0d18ca99870f884a7bff
title: Step 60
challengeType: 0
dashedName: step-60
---
# --description--
All'interno di ogni elemento `.eye`, aggiungi un `div` con una `class` di `eye-lid`.
# --hints--
Dovresti aggiungere un elemento `div` all'interno di `.eye.left`, ma è stato trovato `--fcc-actual--`.
```js
assert.equal(document.querySelectorAll('.eye.left > div')?.length ?? 0, 1);
```
Dovresti aggiungere un elemento `div` all'interno di `.eye.right`, ma è stato trovato `--fcc-actual--`.
```js
assert.equal(document.querySelectorAll('.eye.right > div')?.length ?? 0, 1);
```
Dovresti dare al primo `div` una `class` di `eye-lid`.
```js
assert.exists(document.querySelector('.eye.left > div.eye-lid'));
```
Dovresti dare al secondo nuovo `div` una `class` di `eye-lid`.
```js
assert.exists(document.querySelector('.eye.right > div.eye-lid'));
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href="./styles.css" />
<title>Penguin</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div class="left-mountain"></div>
<div class="back-mountain"></div>
<div class="sun"></div>
<div class="penguin">
--fcc-editable-region--
<div class="penguin-head">
<div class="face left"></div>
<div class="face right"></div>
<div class="chin"></div>
<div class="eye left">
</div>
<div class="eye right">
</div>
</div>
--fcc-editable-region--
<div class="penguin-body"></div>
</div>
<div class="ground"></div>
</body>
</html>
```
```css
:root {
--penguin-face: white;
}
body {
background: linear-gradient(45deg, rgb(118, 201, 255), rgb(247, 255, 222));
margin: 0;
padding: 0;
width: 100%;
height: 100vh;
overflow: clip;
}
.left-mountain {
width: 300px;
height: 300px;
background: linear-gradient(rgb(203, 241, 228), rgb(80, 183, 255));
position: absolute;
transform: skew(0deg, 44deg);
z-index: 2;
margin-top: 100px;
}
.back-mountain {
width: 300px;
height: 300px;
background: linear-gradient(rgb(203, 241, 228), rgb(47, 170, 255));
position: absolute;
z-index: 1;
transform: rotate(45deg);
left: 110px;
top: 225px;
}
.sun {
width: 200px;
height: 200px;
background-color: yellow;
position: absolute;
border-radius: 50%;
top: -75px;
right: -75px;
}
.penguin {
width: 300px;
height: 300px;
margin: auto;
margin-top: 75px;
z-index: 4;
position: relative;
}
.penguin * {
position: absolute;
}
.penguin-head {
width: 50%;
height: 45%;
background: linear-gradient(
45deg,
gray,
rgb(239, 240, 228)
);
border-radius: 70% 70% 65% 65%;
top: 10%;
left: 25%;
z-index: 1;
}
.face {
width: 60%;
height: 70%;
background-color: var(--penguin-face);
border-radius: 70% 70% 60% 60%;
top: 15%;
}
.face.left {
left: 5%;
}
.face.right {
right: 5%;
}
.chin {
width: 90%;
height: 70%;
background-color: var(--penguin-face);
top: 25%;
left: 5%;
border-radius: 70% 70% 100% 100%;
}
.eye {
width: 15%;
height: 17%;
background-color: black;
top: 45%;
border-radius: 50%;
}
.eye.left {
left: 25%;
}
.eye.right {
right: 25%;
}
.penguin-body {
width: 53%;
height: 45%;
background: linear-gradient(
45deg,
rgb(134, 133, 133) 0%,
rgb(234, 231, 231) 25%,
white 67%
);
border-radius: 80% 80% 100% 100%;
top: 40%;
left: 23.5%;
}
.penguin-body::before {
content: "";
position: absolute;
width: 50%;
height: 45%;
background-color: gray;
top: 10%;
left: 25%;
border-radius: 0% 0% 100% 100%;
opacity: 70%;
}
.ground {
width: 100vw;
height: 400px;
background: linear-gradient(90deg, rgb(88, 175, 236), rgb(182, 255, 255));
z-index: 3;
position: absolute;
margin-top: -58px;
}
```

View File

@ -0,0 +1,323 @@
---
id: 619d2fd3ff4f772882e3d998
title: Step 94
challengeType: 0
dashedName: step-94
---
# --description--
Cambia l'ordine di impilamento degli elementi `.arm` in modo che appaiano dietro all'elemento `.penguin-body`.
# --hints--
Dovresti dare a `.arm` uno `z-index` di `--fcc-expected--`, ma è stato trovato `--fcc-actual--`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('.arm')?.zIndex, '-1');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href="./styles.css" />
<title>Penguin</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div class="left-mountain"></div>
<div class="back-mountain"></div>
<div class="sun"></div>
<div class="penguin">
<div class="penguin-head">
<div class="face left"></div>
<div class="face right"></div>
<div class="chin"></div>
<div class="eye left">
<div class="eye-lid"></div>
</div>
<div class="eye right">
<div class="eye-lid"></div>
</div>
<div class="blush left"></div>
<div class="blush right"></div>
<div class="beak top"></div>
<div class="beak bottom"></div>
</div>
<div class="shirt">
<div>💜</div>
<p>I CSS</p>
</div>
<div class="penguin-body">
<div class="arm left"></div>
<div class="arm right"></div>
<div class="foot left"></div>
<div class="foot right"></div>
</div>
</div>
<div class="ground"></div>
</body>
</html>
```
```css
:root {
--penguin-face: white;
--penguin-picorna: orange;
--penguin-skin: gray;
}
body {
background: linear-gradient(45deg, rgb(118, 201, 255), rgb(247, 255, 222));
margin: 0;
padding: 0;
width: 100%;
height: 100vh;
overflow: clip;
}
.left-mountain {
width: 300px;
height: 300px;
background: linear-gradient(rgb(203, 241, 228), rgb(80, 183, 255));
position: absolute;
transform: skew(0deg, 44deg);
z-index: 2;
margin-top: 100px;
}
.back-mountain {
width: 300px;
height: 300px;
background: linear-gradient(rgb(203, 241, 228), rgb(47, 170, 255));
position: absolute;
z-index: 1;
transform: rotate(45deg);
left: 110px;
top: 225px;
}
.sun {
width: 200px;
height: 200px;
background-color: yellow;
position: absolute;
border-radius: 50%;
top: -75px;
right: -75px;
}
.penguin {
width: 300px;
height: 300px;
margin: auto;
margin-top: 75px;
z-index: 4;
position: relative;
}
.penguin * {
position: absolute;
}
.penguin-head {
width: 50%;
height: 45%;
background: linear-gradient(
45deg,
var(--penguin-skin),
rgb(239, 240, 228)
);
border-radius: 70% 70% 65% 65%;
top: 10%;
left: 25%;
z-index: 1;
}
.face {
width: 60%;
height: 70%;
background-color: var(--penguin-face);
border-radius: 70% 70% 60% 60%;
top: 15%;
}
.face.left {
left: 5%;
}
.face.right {
right: 5%;
}
.chin {
width: 90%;
height: 70%;
background-color: var(--penguin-face);
top: 25%;
left: 5%;
border-radius: 70% 70% 100% 100%;
}
.eye {
width: 15%;
height: 17%;
background-color: black;
top: 45%;
border-radius: 50%;
}
.eye.left {
left: 25%;
}
.eye.right {
right: 25%;
}
.eye-lid {
width: 150%;
height: 100%;
background-color: var(--penguin-face);
top: 25%;
left: -23%;
border-radius: 50%;
}
.blush {
width: 15%;
height: 10%;
background-color: pink;
top: 65%;
border-radius: 50%;
}
.blush.left {
left: 15%;
}
.blush.right {
right: 15%;
}
.beak {
height: 10%;
background-color: var(--penguin-picorna);
border-radius: 50%;
}
.beak.top {
width: 20%;
top: 60%;
left: 40%;
}
.beak.bottom {
width: 16%;
top: 65%;
left: 42%;
}
.shirt {
font: bold 25px Helvetica, sans-serif;
top: 165px;
left: 127.5px;
z-index: 1;
color: #6a6969;
}
.shirt div {
font-weight: initial;
top: 22.5px;
left: 12px;
}
.penguin-body {
width: 53%;
height: 45%;
background: linear-gradient(
45deg,
rgb(134, 133, 133) 0%,
rgb(234, 231, 231) 25%,
white 67%
);
border-radius: 80% 80% 100% 100%;
top: 40%;
left: 23.5%;
}
.penguin-body::before {
content: "";
position: absolute;
width: 50%;
height: 45%;
background-color: var(--penguin-skin);
top: 10%;
left: 25%;
border-radius: 0% 0% 100% 100%;
opacity: 70%;
}
--fcc-editable-region--
.arm {
width: 30%;
height: 60%;
background: linear-gradient(
90deg,
var(--penguin-skin),
rgb(209, 210, 199)
);
border-radius: 30% 30% 30% 120%;
}
--fcc-editable-region--
.arm.left {
top: 35%;
left: 5%;
transform-origin: top left;
transform: rotate(130deg) scaleX(-1);
}
.arm.right {
top: 0%;
right: -5%;
transform: rotate(-45deg);
}
.foot {
width: 15%;
height: 30%;
background-color: var(--penguin-picorna);
top: 85%;
border-radius: 50%;
z-index: -1;
}
.foot.left {
left: 25%;
transform: rotate(80deg);
}
.foot.right {
right: 25%;
transform: rotate(-80deg);
}
.ground {
width: 100vw;
height: 400px;
background: linear-gradient(90deg, rgb(88, 175, 236), rgb(182, 255, 255));
z-index: 3;
position: absolute;
margin-top: -58px;
}
```

View File

@ -0,0 +1,208 @@
---
id: 5d822fd413a79914d39e98fd
title: Step 53
challengeType: 0
dashedName: step-53
---
# --description--
Nei prossimi passi, si stanno per utilizzare alcuni trucchi con bordi CSS per girare la sezione `.bb2a` in un triangolo nella parte superiore dell'edificio. Per prima cosa, rimuovi il `background-color` da `.bb2` poiché non ne hai più bisogno.
# --hints--
Dovresti rimuovere il `background-color` da `.bb2`.
```js
assert.isEmpty(new __helpers.CSSHelp(document).getStyle(".bb2")?.backgroundColor);
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<title>City Skyline</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="background-buildings">
<div></div>
<div></div>
<div class="bb1">
<div class="bb1a bb1-window"></div>
<div class="bb1b bb1-window"></div>
<div class="bb1c bb1-window"></div>
<div class="bb1d"></div>
</div>
<div class="bb2">
<div class="bb2a"></div>
<div class="bb2b"></div>
</div>
<div class="bb3"></div>
<div></div>
<div class="bb4"></div>
<div></div>
<div></div>
</div>
<div class="foreground-buildings">
<div></div>
<div></div>
<div class="fb1"></div>
<div class="fb2"></div>
<div></div>
<div class="fb3"></div>
<div class="fb4"></div>
<div class="fb5"></div>
<div class="fb6"></div>
<div></div>
<div></div>
</div>
</body>
</html>
```
```css
:root {
--building-color1: #aa80ff;
--building-color2: #66cc99;
--building-color3: #cc6699;
--building-color4: #538cc6;
--window-color1: black;
--window-color2: #8cd9b3;
}
* {
border: 1px solid black;
box-sizing: border-box;
}
body {
height: 100vh;
margin: 0;
overflow: hidden;
}
.background-buildings, .foreground-buildings {
width: 100%;
height: 100%;
display: flex;
align-items: flex-end;
justify-content: space-evenly;
position: absolute;
top: 0;
}
/* BACKGROUND BUILDINGS - "bb" stands for "background building" */
.bb1 {
width: 10%;
height: 70%;
display: flex;
flex-direction: column;
align-items: center;
}
.bb1a {
width: 70%;
}
.bb1b {
width: 80%;
}
.bb1c {
width: 90%;
}
.bb1d {
width: 100%;
height: 70%;
background: linear-gradient(
var(--building-color1) 50%,
var(--window-color1)
);
}
.bb1-window {
height: 10%;
background: linear-gradient(
var(--building-color1),
var(--window-color1)
);
}
--fcc-editable-region--
.bb2 {
width: 10%;
height: 50%;
background-color: var(--building-color2);
}
--fcc-editable-region--
.bb2b {
width: 100%;
height: 100%;
background: repeating-linear-gradient(
var(--building-color2),
var(--building-color2) 6%,
var(--window-color2) 6%,
var(--window-color2) 9%
);
}
.bb3 {
width: 10%;
height: 55%;
background-color: var(--building-color3);
}
.bb4 {
width: 11%;
height: 58%;
background-color: var(--building-color4);
}
/* FOREGROUND BUILDINGS - "fb" stands for "foreground building" */
.fb1 {
width: 10%;
height: 60%;
background-color: var(--building-color4);
}
.fb2 {
width: 10%;
height: 40%;
background-color: var(--building-color3);
}
.fb3 {
width: 10%;
height: 35%;
background-color: var(--building-color1);
}
.fb4 {
width: 8%;
height: 45%;
background-color: var(--building-color1);
position: relative;
left: 10%;
}
.fb5 {
width: 10%;
height: 33%;
background-color: var(--building-color2);
position: relative;
right: 10%;
}
.fb6 {
width: 9%;
height: 38%;
background-color: var(--building-color3);
}
```

View File

@ -0,0 +1,401 @@
---
id: 5d822fd413a79914d39e9936
title: Step 110
challengeType: 0
dashedName: step-110
---
# --description--
Va bene, gli edifici sono finiti. Torna al selettore `*` e rimuovi il `border` che hai applicato a tutto all'inizio e gli edifici si uniranno.
# --hints--
Dovresti rimuovere il `border` dal selettore `*`.
```js
assert.isEmpty(new __helpers.CSSHelp(document).getStyle("*")?.border);
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<title>City Skyline</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="background-buildings">
<div></div>
<div></div>
<div class="bb1 building-wrap">
<div class="bb1a bb1-window"></div>
<div class="bb1b bb1-window"></div>
<div class="bb1c bb1-window"></div>
<div class="bb1d"></div>
</div>
<div class="bb2">
<div class="bb2a"></div>
<div class="bb2b"></div>
</div>
<div class="bb3"></div>
<div></div>
<div class="bb4 building-wrap">
<div class="bb4a"></div>
<div class="bb4b"></div>
<div class="bb4c window-wrap">
<div class="bb4-window"></div>
<div class="bb4-window"></div>
<div class="bb4-window"></div>
<div class="bb4-window"></div>
</div>
</div>
<div></div>
<div></div>
</div>
<div class="foreground-buildings">
<div></div>
<div></div>
<div class="fb1 building-wrap">
<div class="fb1a"></div>
<div class="fb1b"></div>
<div class="fb1c"></div>
</div>
<div class="fb2">
<div class="fb2a"></div>
<div class="fb2b window-wrap">
<div class="fb2-window"></div>
<div class="fb2-window"></div>
<div class="fb2-window"></div>
</div>
</div>
<div></div>
<div class="fb3 building-wrap">
<div class="fb3a window-wrap">
<div class="fb3-window"></div>
<div class="fb3-window"></div>
<div class="fb3-window"></div>
</div>
<div class="fb3b"></div>
<div class="fb3a"></div>
<div class="fb3b"></div>
</div>
<div class="fb4">
<div class="fb4a"></div>
<div class="fb4b">
<div class="fb4-window"></div>
<div class="fb4-window"></div>
<div class="fb4-window"></div>
<div class="fb4-window"></div>
<div class="fb4-window"></div>
<div class="fb4-window"></div>
</div>
</div>
<div class="fb5"></div>
<div class="fb6"></div>
<div></div>
<div></div>
</div>
</body>
</html>
```
```css
:root {
--building-color1: #aa80ff;
--building-color2: #66cc99;
--building-color3: #cc6699;
--building-color4: #538cc6;
--window-color1: #bb99ff;
--window-color2: #8cd9b3;
--window-color3: #d98cb3;
--window-color4: #8cb3d9;
}
--fcc-editable-region--
* {
border: 1px solid black;
box-sizing: border-box;
}
--fcc-editable-region--
body {
height: 100vh;
margin: 0;
overflow: hidden;
}
.background-buildings, .foreground-buildings {
width: 100%;
height: 100%;
display: flex;
align-items: flex-end;
justify-content: space-evenly;
position: absolute;
top: 0;
}
.building-wrap {
display: flex;
flex-direction: column;
align-items: center;
}
.window-wrap {
display: flex;
align-items: center;
justify-content: space-evenly;
}
/* BACKGROUND BUILDINGS - "bb" stands for "background building" */
.bb1 {
width: 10%;
height: 70%;
}
.bb1a {
width: 70%;
}
.bb1b {
width: 80%;
}
.bb1c {
width: 90%;
}
.bb1d {
width: 100%;
height: 70%;
background: linear-gradient(
var(--building-color1) 50%,
var(--window-color1)
);
}
.bb1-window {
height: 10%;
background: linear-gradient(
var(--building-color1),
var(--window-color1)
);
}
.bb2 {
width: 10%;
height: 50%;
}
.bb2a {
border-bottom: 5vh solid var(--building-color2);
border-left: 5vw solid transparent;
border-right: 5vw solid transparent;
}
.bb2b {
width: 100%;
height: 100%;
background: repeating-linear-gradient(
var(--building-color2),
var(--building-color2) 6%,
var(--window-color2) 6%,
var(--window-color2) 9%
);
}
.bb3 {
width: 10%;
height: 55%;
background: repeating-linear-gradient(
90deg,
var(--building-color3),
var(--building-color3),
var(--window-color3) 15%
);
}
.bb4 {
width: 11%;
height: 58%;
}
.bb4a {
width: 3%;
height: 10%;
background-color: var(--building-color4);
}
.bb4b {
width: 80%;
height: 5%;
background-color: var(--building-color4);
}
.bb4c {
width: 100%;
height: 85%;
background-color: var(--building-color4);
}
.bb4-window {
width: 18%;
height: 90%;
background-color: var(--window-color4);
}
/* FOREGROUND BUILDINGS - "fb" stands for "foreground building" */
.fb1 {
width: 10%;
height: 60%;
}
.fb1a {
border-bottom: 7vh solid var(--building-color4);
border-left: 2vw solid transparent;
border-right: 2vw solid transparent;
}
.fb1b {
width: 60%;
height: 10%;
background-color: var(--building-color4);
}
.fb1c {
width: 100%;
height: 80%;
background: repeating-linear-gradient(
90deg,
var(--building-color4),
var(--building-color4) 10%,
transparent 10%,
transparent 15%
),
repeating-linear-gradient(
var(--building-color4),
var(--building-color4) 10%,
var(--window-color4) 10%,
var(--window-color4) 90%
);
}
.fb2 {
width: 10%;
height: 40%;
}
.fb2a {
width: 100%;
border-bottom: 10vh solid var(--building-color3);
border-left: 1vw solid transparent;
border-right: 1vw solid transparent;
}
.fb2b {
width: 100%;
height: 75%;
background-color: var(--building-color3);
}
.fb2-window {
width: 22%;
height: 100%;
background-color: var(--window-color3);
}
.fb3 {
width: 10%;
height: 35%;
}
.fb3a {
width: 80%;
height: 15%;
background-color: var(--building-color1);
}
.fb3b {
width: 100%;
height: 35%;
background-color: var(--building-color1);
}
.fb3-window {
width: 25%;
height: 80%;
background-color: var(--window-color1);
}
.fb4 {
width: 8%;
height: 45%;
position: relative;
left: 10%;
}
.fb4a {
border-top: 5vh solid transparent;
border-left: 8vw solid var(--building-color1);
}
.fb4b {
width: 100%;
height: 89%;
background-color: var(--building-color1);
display: flex;
flex-wrap: wrap;
}
.fb4-window {
width: 30%;
height: 10%;
border-radius: 50%;
background-color: var(--window-color1);
margin: 10%;
}
.fb5 {
width: 10%;
height: 33%;
position: relative;
right: 10%;
background: repeating-linear-gradient(
var(--building-color2),
var(--building-color2) 5%,
transparent 5%,
transparent 10%
),
repeating-linear-gradient(
90deg,
var(--building-color2),
var(--building-color2) 12%,
var(--window-color2) 12%,
var(--window-color2) 44%
);
}
.fb6 {
width: 9%;
height: 38%;
background: repeating-linear-gradient(
90deg,
var(--building-color3),
var(--building-color3) 10%,
transparent 10%,
transparent 30%
),
repeating-linear-gradient(
var(--building-color3),
var(--building-color3) 10%,
var(--window-color3) 10%,
var(--window-color3) 30%
);
}
```

View File

@ -0,0 +1,423 @@
---
id: 5d822fd413a79914d39e993b
title: Step 115
challengeType: 0
dashedName: step-115
---
# --description--
Copia e incolla l'intera classe `sky` insieme a tutte le sue proprietà e valori nella media query. Stai per creare un altro schema di colori per la skyline che la cambia da giorno a notte.
Nota: Hai bisogno di scorrere oltre la regione modificabile per copiare la classe.
# --hints--
Non dovresti cancellare la dichiarazione `.sky` esistente.
```js
assert.match(new __helpers.CSSHelp(document).getStyle(".sky")?.getPropVal('background', true), /radial-gradient\(circleclosest-cornerat15%15%,rgb\(255,207,51\)(0%)?,rgb\(255,207,51\)20%,rgb\(255,255,102\)21%,rgb\(187,238,255\)100%\)/);
```
Dovresti copiare la dichiarazione `.sky` esistente nella query multimediale.
```js
assert.match(new __helpers.CSSHelp(document).getRuleListsWithinMedia("(max-width: 1000px)")?.find(x => x.selectorText===".sky")?.style?.background, /radial-gradient\(\s*circle\s+closest-corner\s+at\s+15%\s+15%\s*,\s+rgb\(\s*255\s*,\s*207\s*,\s*51\s*\)\s*(0%)?\s*,\s*rgb\(\s*255\s*,\s*207\s*,\s*51\s*\)\s+20%\s*,\s*rgb\(\s*255\s*,\s*255\s*,\s*102\s*\)\s+21%\s*,\s*rgb\(\s*187\s*,\s*238\s*,\s*255\s*\)\s+100%\s*\)/);
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<title>City Skyline</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="background-buildings sky">
<div></div>
<div></div>
<div class="bb1 building-wrap">
<div class="bb1a bb1-window"></div>
<div class="bb1b bb1-window"></div>
<div class="bb1c bb1-window"></div>
<div class="bb1d"></div>
</div>
<div class="bb2">
<div class="bb2a"></div>
<div class="bb2b"></div>
</div>
<div class="bb3"></div>
<div></div>
<div class="bb4 building-wrap">
<div class="bb4a"></div>
<div class="bb4b"></div>
<div class="bb4c window-wrap">
<div class="bb4-window"></div>
<div class="bb4-window"></div>
<div class="bb4-window"></div>
<div class="bb4-window"></div>
</div>
</div>
<div></div>
<div></div>
</div>
<div class="foreground-buildings">
<div></div>
<div></div>
<div class="fb1 building-wrap">
<div class="fb1a"></div>
<div class="fb1b"></div>
<div class="fb1c"></div>
</div>
<div class="fb2">
<div class="fb2a"></div>
<div class="fb2b window-wrap">
<div class="fb2-window"></div>
<div class="fb2-window"></div>
<div class="fb2-window"></div>
</div>
</div>
<div></div>
<div class="fb3 building-wrap">
<div class="fb3a window-wrap">
<div class="fb3-window"></div>
<div class="fb3-window"></div>
<div class="fb3-window"></div>
</div>
<div class="fb3b"></div>
<div class="fb3a"></div>
<div class="fb3b"></div>
</div>
<div class="fb4">
<div class="fb4a"></div>
<div class="fb4b">
<div class="fb4-window"></div>
<div class="fb4-window"></div>
<div class="fb4-window"></div>
<div class="fb4-window"></div>
<div class="fb4-window"></div>
<div class="fb4-window"></div>
</div>
</div>
<div class="fb5"></div>
<div class="fb6"></div>
<div></div>
<div></div>
</div>
</body>
</html>
```
```css
:root {
--building-color1: #aa80ff;
--building-color2: #66cc99;
--building-color3: #cc6699;
--building-color4: #538cc6;
--window-color1: #bb99ff;
--window-color2: #8cd9b3;
--window-color3: #d98cb3;
--window-color4: #8cb3d9;
}
* {
box-sizing: border-box;
}
body {
height: 100vh;
margin: 0;
overflow: hidden;
}
.background-buildings, .foreground-buildings {
width: 100%;
height: 100%;
display: flex;
align-items: flex-end;
justify-content: space-evenly;
position: absolute;
top: 0;
}
.building-wrap {
display: flex;
flex-direction: column;
align-items: center;
}
.window-wrap {
display: flex;
align-items: center;
justify-content: space-evenly;
}
.sky {
background: radial-gradient(
closest-corner circle at 15% 15%,
#ffcf33,
#ffcf33 20%,
#ffff66 21%,
#bbeeff 100%
);
}
/* BACKGROUND BUILDINGS - "bb" stands for "background building" */
.bb1 {
width: 10%;
height: 70%;
}
.bb1a {
width: 70%;
}
.bb1b {
width: 80%;
}
.bb1c {
width: 90%;
}
.bb1d {
width: 100%;
height: 70%;
background: linear-gradient(
var(--building-color1) 50%,
var(--window-color1)
);
}
.bb1-window {
height: 10%;
background: linear-gradient(
var(--building-color1),
var(--window-color1)
);
}
.bb2 {
width: 10%;
height: 50%;
}
.bb2a {
border-bottom: 5vh solid var(--building-color2);
border-left: 5vw solid transparent;
border-right: 5vw solid transparent;
}
.bb2b {
width: 100%;
height: 100%;
background: repeating-linear-gradient(
var(--building-color2),
var(--building-color2) 6%,
var(--window-color2) 6%,
var(--window-color2) 9%
);
}
.bb3 {
width: 10%;
height: 55%;
background: repeating-linear-gradient(
90deg,
var(--building-color3),
var(--building-color3),
var(--window-color3) 15%
);
}
.bb4 {
width: 11%;
height: 58%;
}
.bb4a {
width: 3%;
height: 10%;
background-color: var(--building-color4);
}
.bb4b {
width: 80%;
height: 5%;
background-color: var(--building-color4);
}
.bb4c {
width: 100%;
height: 85%;
background-color: var(--building-color4);
}
.bb4-window {
width: 18%;
height: 90%;
background-color: var(--window-color4);
}
/* FOREGROUND BUILDINGS - "fb" stands for "foreground building" */
.fb1 {
width: 10%;
height: 60%;
}
.fb1a {
border-bottom: 7vh solid var(--building-color4);
border-left: 2vw solid transparent;
border-right: 2vw solid transparent;
}
.fb1b {
width: 60%;
height: 10%;
background-color: var(--building-color4);
}
.fb1c {
width: 100%;
height: 80%;
background: repeating-linear-gradient(
90deg,
var(--building-color4),
var(--building-color4) 10%,
transparent 10%,
transparent 15%
),
repeating-linear-gradient(
var(--building-color4),
var(--building-color4) 10%,
var(--window-color4) 10%,
var(--window-color4) 90%
);
}
.fb2 {
width: 10%;
height: 40%;
}
.fb2a {
width: 100%;
border-bottom: 10vh solid var(--building-color3);
border-left: 1vw solid transparent;
border-right: 1vw solid transparent;
}
.fb2b {
width: 100%;
height: 75%;
background-color: var(--building-color3);
}
.fb2-window {
width: 22%;
height: 100%;
background-color: var(--window-color3);
}
.fb3 {
width: 10%;
height: 35%;
}
.fb3a {
width: 80%;
height: 15%;
background-color: var(--building-color1);
}
.fb3b {
width: 100%;
height: 35%;
background-color: var(--building-color1);
}
.fb3-window {
width: 25%;
height: 80%;
background-color: var(--window-color1);
}
.fb4 {
width: 8%;
height: 45%;
position: relative;
left: 10%;
}
.fb4a {
border-top: 5vh solid transparent;
border-left: 8vw solid var(--building-color1);
}
.fb4b {
width: 100%;
height: 89%;
background-color: var(--building-color1);
display: flex;
flex-wrap: wrap;
}
.fb4-window {
width: 30%;
height: 10%;
border-radius: 50%;
background-color: var(--window-color1);
margin: 10%;
}
.fb5 {
width: 10%;
height: 33%;
position: relative;
right: 10%;
background: repeating-linear-gradient(
var(--building-color2),
var(--building-color2) 5%,
transparent 5%,
transparent 10%
),
repeating-linear-gradient(
90deg,
var(--building-color2),
var(--building-color2) 12%,
var(--window-color2) 12%,
var(--window-color2) 44%
);
}
.fb6 {
width: 9%;
height: 38%;
background: repeating-linear-gradient(
90deg,
var(--building-color3),
var(--building-color3) 10%,
transparent 10%,
transparent 30%
),
repeating-linear-gradient(
var(--building-color3),
var(--building-color3) 10%,
var(--window-color3) 10%,
var(--window-color3) 30%
);
}
--fcc-editable-region--
@media (max-width: 1000px) {
}
--fcc-editable-region--
```

View File

@ -0,0 +1,81 @@
---
id: 60f8604682407e0d017bbf7f
title: Step 23
challengeType: 0
dashedName: step-23
---
# --description--
Per i termini e le condizioni, aggiungi un `input` con un `type` di `checkbox` al terzo elemento `label`. Inoltre, dato che non vogliamo che gli utenti si registrino senza aver letto i termini e le condizioni, rendilo `required`.
# --hints--
Dovresti aggiungere un `input` al terzo elemento `label`.
```js
assert.exists(document.querySelector('fieldset:nth-child(2) label:nth-child(3) input'));
```
Dovresti aggiungere un attributo `type` con valore `checkbox` all'elemento `input`.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(3) input')?.type, 'checkbox');
```
Dovresti aggiungere un attributo `required` all'elemento `input`.
```js
assert.equal(document.querySelector('fieldset:nth-child(2) label:nth-child(3) input')?.required, true);
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<title>Registration Form</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<h1>Registration Form</h1>
<p>Please fill out this form with the required information</p>
<form action='https://fcc-registration-form.com'>
<fieldset>
<label>Enter Your First Name: <input type="text" required /></label>
<label>Enter Your Last Name: <input type="text" required /></label>
<label>Enter Your Email: <input type="email" required /></label>
<label>Create a New Password: <input type="password" pattern="[a-z0-5]{8,}" required /></label>
</fieldset>
--fcc-editable-region--
<fieldset>
<label><input type="radio" /></label>
<label><input type="radio" /></label>
<label></label>
</fieldset>
--fcc-editable-region--
<fieldset></fieldset>
<input type="submit" value="Submit" />
</form>
</body>
</html>
```
```css
body {
width: 100%;
height: 100vh;
margin: 0;
background-color: #1b1b32;
color: #f5f6f7;
}
label {
display: block;
margin: 0.5rem 0;
}
```

View File

@ -0,0 +1,220 @@
---
id: 60b69a66b6ddb80858c515aa
title: Step 53
challengeType: 0
dashedName: step-53
---
# --description--
Ora imposta la `position` ad `absolute`, il `top` a `20%` e il `left` a `20%`.
# --hints--
Il tuo selettore `#blue-left` dovrebbe avere una proprietà `position` impostata a `absolute`.
```js
assert(new __helpers.CSSHelp(document).getStyle('#blue-left')?.position === 'absolute');
```
Il tuo selettore `#blue-left` dovrebbe avere una proprietà `top` impostata al `20%`.
```js
assert(new __helpers.CSSHelp(document).getStyle('#blue-left')?.top === '20%');
```
Il selettore `#blue-left` dovrebbe avere una proprietà `left` impostata a `20%`.
```js
assert(new __helpers.CSSHelp(document).getStyle('#blue-left')?.left === '20%');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Picasso Painting</title>
<link rel="stylesheet" type="text/css" href="./styles.css" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
</head>
<body>
<div id="back-wall"></div>
<div class="characters">
<div id="offwhite-character">
<div id="white-hat"></div>
<div id="black-mask">
<div class="eyes left"></div>
<div class="eyes right"></div>
</div>
<div id="gray-instrument">
<div class="black-dot"></div>
<div class="black-dot"></div>
<div class="black-dot"></div>
<div class="black-dot"></div>
<div class="black-dot"></div>
</div>
<div id="tan-table"></div>
</div>
<div id="black-character">
<div id="black-hat"></div>
<div id="gray-mask">
<div class="eyes left"></div>
<div class="eyes right"></div>
</div>
<div id="white-paper">
<i class="fas fa-music"></i>
<i class="fas fa-music"></i>
<i class="fas fa-music"></i>
<i class="fas fa-music"></i>
</div>
</div>
<div class="blue" id="blue-left"></div>
<div class="blue" id="blue-right"></div>
</div>
</body>
</html>
```
```css
body {
background-color: rgb(184, 132, 46);
}
#back-wall {
background-color: #8B4513;
width: 100%;
height: 60%;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
#offwhite-character {
width: 300px;
height: 550px;
background-color: GhostWhite;
position: absolute;
top: 20%;
left: 17.5%;
}
#white-hat {
width: 0;
height: 0;
border-style: solid;
border-width: 0 120px 140px 180px;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: GhostWhite;
border-left-color: transparent;
position: absolute;
top: -140px;
left: 0;
}
#black-mask {
width: 100%;
height: 50px;
background-color: rgb(45, 31, 19);
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
#gray-instrument {
width: 15%;
height: 40%;
background-color: rgb(167, 162, 117);
position: absolute;
top: 50px;
left: 125px;
z-index: 1;
}
.black-dot {
width: 10px;
height: 10px;
background-color: rgb(45, 31, 19);
border-radius: 50%;
display: block;
margin: auto;
margin-top: 65%;
}
#tan-table {
width: 450px;
height: 140px;
background-color: #D2691E;
position: absolute;
top: 275px;
left: 15px;
z-index: 1;
}
#black-character {
width: 300px;
height: 500px;
background-color: rgb(45, 31, 19);
position: absolute;
top: 30%;
left: 59%;
}
#black-hat {
width: 0;
height: 0;
border-style: solid;
border-width: 150px 0 0 300px;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: rgb(45, 31, 19);
position: absolute;
top: -150px;
left: 0;
}
#gray-mask {
width: 150px;
height: 150px;
background-color: rgb(167, 162, 117);
position: absolute;
top: -10px;
left: 70px;
}
#white-paper {
width: 400px;
height: 100px;
background-color: GhostWhite;
position: absolute;
top: 250px;
left: -150px;
z-index: 1;
}
.fa-music {
display: inline-block;
margin-top: 8%;
margin-left: 13%;
}
.blue {
background-color: #1E90FF;
}
#blue-left {
width: 500px;
height: 300px;
--fcc-editable-region--
--fcc-editable-region--
}
```

View File

@ -0,0 +1,295 @@
---
id: 60b69a66b6ddb80858c515bc
title: Step 70
challengeType: 0
dashedName: step-70
---
# --description--
Dai a `eyes-div` uno `z-index` di `3`.
# --hints--
Il selettore `#eyes-div` dovrebbe avere una proprietà `z-index` impostata a `3`.
```js
assert(new __helpers.CSSHelp(document).getStyle('#eyes-div')?.zIndex === '3');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Picasso Painting</title>
<link rel="stylesheet" type="text/css" href="./styles.css" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
</head>
<body>
<div id="back-wall"></div>
<div class="characters">
<div id="offwhite-character">
<div id="white-hat"></div>
<div id="black-mask">
<div class="eyes left"></div>
<div class="eyes right"></div>
</div>
<div id="gray-instrument">
<div class="black-dot"></div>
<div class="black-dot"></div>
<div class="black-dot"></div>
<div class="black-dot"></div>
<div class="black-dot"></div>
</div>
<div id="tan-table"></div>
</div>
<div id="black-character">
<div id="black-hat"></div>
<div id="gray-mask">
<div class="eyes left"></div>
<div class="eyes right"></div>
</div>
<div id="white-paper">
<i class="fas fa-music"></i>
<i class="fas fa-music"></i>
<i class="fas fa-music"></i>
<i class="fas fa-music"></i>
</div>
</div>
<div class="blue" id="blue-left"></div>
<div class="blue" id="blue-right"></div>
<div id="orange-character">
<div id="black-round-hat"></div>
<div id="eyes-div">
<div class="eyes left"></div>
<div class="eyes right"></div>
</div>
<div id="triangles">
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
<div class="triangle"></div>
</div>
<div id="guitar">
<div class="guitar" id="guitar-left">
<i class="fas fa-bars"></i>
</div>
<div class="guitar" id="guitar-right">
<i class="fas fa-bars"></i>
</div>
<div id="guitar-neck"></div>
</div>
</div>
</div>
</body>
</html>
```
```css
body {
background-color: rgb(184, 132, 46);
}
#back-wall {
background-color: #8B4513;
width: 100%;
height: 60%;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
#offwhite-character {
width: 300px;
height: 550px;
background-color: GhostWhite;
position: absolute;
top: 20%;
left: 17.5%;
}
#white-hat {
width: 0;
height: 0;
border-style: solid;
border-width: 0 120px 140px 180px;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: GhostWhite;
border-left-color: transparent;
position: absolute;
top: -140px;
left: 0;
}
#black-mask {
width: 100%;
height: 50px;
background-color: rgb(45, 31, 19);
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
#gray-instrument {
width: 15%;
height: 40%;
background-color: rgb(167, 162, 117);
position: absolute;
top: 50px;
left: 125px;
z-index: 1;
}
.black-dot {
width: 10px;
height: 10px;
background-color: rgb(45, 31, 19);
border-radius: 50%;
display: block;
margin: auto;
margin-top: 65%;
}
#tan-table {
width: 450px;
height: 140px;
background-color: #D2691E;
position: absolute;
top: 275px;
left: 15px;
z-index: 1;
}
#black-character {
width: 300px;
height: 500px;
background-color: rgb(45, 31, 19);
position: absolute;
top: 30%;
left: 59%;
}
#black-hat {
width: 0;
height: 0;
border-style: solid;
border-width: 150px 0 0 300px;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: rgb(45, 31, 19);
position: absolute;
top: -150px;
left: 0;
}
#gray-mask {
width: 150px;
height: 150px;
background-color: rgb(167, 162, 117);
position: absolute;
top: -10px;
left: 70px;
}
#white-paper {
width: 400px;
height: 100px;
background-color: GhostWhite;
position: absolute;
top: 250px;
left: -150px;
z-index: 1;
}
.fa-music {
display: inline-block;
margin-top: 8%;
margin-left: 13%;
}
.blue {
background-color: #1E90FF;
}
#blue-left {
width: 500px;
height: 300px;
position: absolute;
top: 20%;
left: 20%;
}
#blue-right {
width: 400px;
height: 300px;
position: absolute;
top: 50%;
left: 40%;
}
#orange-character {
width: 250px;
height: 550px;
background-color: rgb(240, 78, 42);
position: absolute;
top: 25%;
left: 40%;
}
#black-round-hat {
width: 180px;
height: 150px;
background-color: rgb(45, 31, 19);
border-radius: 50%;
position: absolute;
top: -100px;
left: 5px;
z-index: -1;
}
#eyes-div {
width: 180px;
height: 50px;
position: absolute;
top: -40px;
left: 20px;
--fcc-editable-region--
--fcc-editable-region--
}
```

View File

@ -0,0 +1,142 @@
---
id: 61fd78621573aa5e8b512f5e
title: Step 15
challengeType: 0
dashedName: step-15
---
# --description--
Nel tuo terzo elemento `tr`, aggiungi un elemento `th` con il testo `Savings Funds set aside for emergencies.`. Manda a capo il testo, ad eccezione dei `Savings`, all'interno di un elemento `span` con la `class` impostata a `description`.
In seguito, aggiungi tre elementi `td` con il seguente testo (in ordine): `$500`, `$650`, `$728`. Dai al terzo elemento `td` una `class` impostata a `current`.
# --hints--
Il tuo terzo `tr` dovrebbe avere un elemento `th`.
```js
assert(document.querySelector('tbody')?.querySelectorAll('tr')?.[2]?.querySelector('th'));
```
Il tuo elemento `th` dovrebbe avere il testo `Savings Funds set aside for emergencies.`.
```js
assert(document.querySelector('tbody')?.querySelectorAll('tr')?.[2]?.querySelector('th')?.innerText === 'Savings Funds set aside for emergencies.');
```
Dovresti mandare a capo il testo `Funds set aside for emergencies.` in un elemento `span`.
```js
assert(document.querySelector('tbody')?.querySelectorAll('tr')?.[2]?.querySelector('th > span')?.textContent === 'Funds set aside for emergencies.');
```
Il tuo elemento `span` dovrebbe avere l'attributo `class` impostato a `description`.
```js
assert(document.querySelector('tbody')?.querySelectorAll('tr')?.[2]?.querySelector('th > span')?.classList?.contains('description'));
```
Dovresti avere tre elementi di `td`.
```js
assert(document.querySelector('tbody')?.querySelectorAll('tr')?.[2]?.querySelectorAll('td').length === 3);
```
Il tuo primo elemento `td` dovrebbe avere il testo `$500`.
```js
assert(document.querySelector('tbody')?.querySelectorAll('tr')?.[2]?.querySelectorAll('td')?.[0]?.textContent === '$500');
```
Il secondo elemento `td` dovrebbe avere il testo `$650`.
```js
assert(document.querySelector('tbody')?.querySelectorAll('tr')?.[2]?.querySelectorAll('td')?.[1]?.textContent === '$650');
```
Il tuo terzo elemento `td` dovrebbe avvere il testo `$728`.
```js
assert(document.querySelector('tbody')?.querySelectorAll('tr')?.[2]?.querySelectorAll('td')?.[2]?.textContent === '$728');
```
Il tuo terzo elemento `td` dovrebbe avere la `class` impostata su `current`.
```js
assert(document.querySelector('tbody')?.querySelectorAll('tr')?.[2]?.querySelectorAll('td')?.[2]?.classList?.contains('current'));
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Balance Sheet</title>
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
<main>
<section>
<h1>
<span class="flex">
<span>AcmeWidgetCorp</span>
<span>Balance Sheet</span>
</span>
</h1>
<div id="years" aria-hidden="true">
<span class="year">2019</span>
<span class="year">2020</span>
<span class="year">2021</span>
</div>
<div class="table-wrap">
<table>
<caption>Assets</caption>
<thead>
<tr>
<td></td>
<th><span class="sr-only year">2019</span></th>
<th><span class="sr-only year">2020</span></th>
<th class="current"><span class="sr-only year">2021</span></th>
</tr>
</thead>
<tbody>
<tr class="data">
<th>Cash <span class="description">This is the cash we currently have on hand.</span></th>
<td>$25</td>
<td>$30</td>
<td class="current">$28</td>
</tr>
<tr class="data">
<th>Checking <span class="description">Our primary transactional account.</span></th>
<td>$54</td>
<td>$56</td>
<td class="current">$53</td>
</tr>
--fcc-editable-region--
<tr class="data">
</tr>
--fcc-editable-region--
<tr class="total">
</tr>
</tbody>
</table>
<table>
</table>
<table>
</table>
</div>
</section>
</main>
</body>
</html>
```
```css
```

View File

@ -0,0 +1,271 @@
---
id: 620191707bc65579ddd3ce15
title: Step 55
challengeType: 0
dashedName: step-55
---
# --description--
Usando la stessa sintassi dei selettori, seleziona gli elementi `th` all'interno delle righe della tabella in cui la `class` è `total`. Allinea i testi a sinistra e dà loro un padding di `0.5rem 0 0.25rem 0.5rem`.
# --hints--
Dovresti avere un selettore `tr[class="total"] th`.
```js
assert(new __helpers.CSSHelp(document).getStyle('tr[class="total"] th'));
```
Il selettore `tr[class="total"] th` dovrebbe avere una proprietà `text-align` impostata a `sinistra`.
```js
assert(new __helpers.CSSHelp(document).getStyle('tr[class="total"] th')?.getPropertyValue('text-align') === 'left');
```
Il selettore `tr[class="total"] th` dovrebbe avere una proprietà `padding` impostata a `0.5rem 0 0.25rem 0.5rem`.
```js
assert(new __helpers.CSSHelp(document).getStyle('tr[class="total"] th')?.getPropertyValue('padding') === '0.5rem 0px 0.25rem 0.5rem');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Balance Sheet</title>
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
<main>
<section>
<h1>
<span class="flex">
<span>AcmeWidgetCorp</span>
<span>Balance Sheet</span>
</span>
</h1>
<div id="years" aria-hidden="true">
<span class="year">2019</span>
<span class="year">2020</span>
<span class="year">2021</span>
</div>
<div class="table-wrap">
<table>
<caption>Assets</caption>
<thead>
<tr>
<td></td>
<th><span class="sr-only year">2019</span></th>
<th><span class="sr-only year">2020</span></th>
<th class="current"><span class="sr-only year">2021</span></th>
</tr>
</thead>
<tbody>
<tr class="data">
<th>Cash <span class="description">This is the cash we currently have on hand.</span></th>
<td>$25</td>
<td>$30</td>
<td class="current">$28</td>
</tr>
<tr class="data">
<th>Checking <span class="description">Our primary transactional account.</span></th>
<td>$54</td>
<td>$56</td>
<td class="current">$53</td>
</tr>
<tr class="data">
<th>Savings <span class="description">Funds set aside for emergencies.</span></th>
<td>$500</td>
<td>$650</td>
<td class="current">$728</td>
</tr>
<tr class="total">
<th>Total <span class="sr-only">Assets</span></th>
<td>$579</td>
<td>$736</td>
<td class="current">$809</td>
</tr>
</tbody>
</table>
<table>
<caption>Liabilities</caption>
<thead>
<tr>
<td></td>
<th><span class="sr-only">2019</span></th>
<th><span class="sr-only">2020</span></th>
<th><span class="sr-only">2021</span></th>
</tr>
</thead>
<tbody>
<tr class="data">
<th>Loans <span class="description">The outstanding balance on our startup loan.</span></th>
<td>$500</td>
<td>$250</td>
<td class="current">$0</td>
</tr>
<tr class="data">
<th>Expenses <span class="description">Annual anticipated expenses, such as payroll.</span></th>
<td>$200</td>
<td>$300</td>
<td class="current">$400</td>
</tr>
<tr class="data">
<th>Credit <span class="description">The outstanding balance on our credit card.</span></th>
<td>$50</td>
<td>$50</td>
<td class="current">$75</td>
</tr>
<tr class="total">
<th>Total <span class="sr-only">Liabilities</span></th>
<td>$750</td>
<td>$600</td>
<td class="current">$475</td>
</tr>
</tbody>
</table>
<table>
<caption>Net Worth</caption>
<thead>
<tr>
<td></td>
<th><span class="sr-only">2019</span></th>
<th><span class="sr-only">2020</span></th>
<th><span class="sr-only">2021</span></th>
</tr>
</thead>
<tbody>
<tr class="total">
<th>Total <span class="sr-only">Net Worth</span></th>
<td>$-171</td>
<td>$136</td>
<td class="current">$334</td>
</tr>
</tbody>
</table>
</div>
</section>
</main>
</body>
</html>
```
```css
span[class~="sr-only"] {
border: 0 !important;
clip: rect(1px, 1px, 1px, 1px) !important;
clip-path: inset(50%) !important;
-webkit-clip-path: inset(50%) !important;
height: 1px !important;
width: 1px !important;
position: absolute !important;
overflow: hidden !important;
white-space: nowrap !important;
padding: 0 !important;
margin: -1px !important;
}
html {
box-sizing: border-box;
}
body {
font-family: sans-serif;
color: #0a0a23;
}
h1 {
max-width: 37.25rem;
margin: 0 auto;
padding: 1.5rem 1.25rem;
}
h1 .flex {
display: flex;
flex-direction: column-reverse;
gap: 1rem;
}
h1 .flex span:first-of-type {
font-size: 0.7em;
}
h1 .flex span:last-of-type {
font-size: 1.2em;
}
section {
max-width: 40rem;
margin: 0 auto;
border: 2px solid #d0d0d5;
}
#years {
display: flex;
justify-content: flex-end;
position: sticky;
top: 0;
background: #0a0a23;
color: #fff;
z-index: 999;
padding: 0.5rem calc(1.25rem + 2px) 0.5rem 0;
margin: 0 -2px;
}
#years span[class] {
font-weight: bold;
width: 4.5rem;
text-align: right;
}
.table-wrap {
padding: 0 0.75rem 1.5rem 0.75rem;
}
span {
font-weight: normal;
}
table {
border-collapse: collapse;
border: 0;
width: 100%;
position: relative;
margin-top: 3rem;
}
table caption {
color: #356eaf;
font-size: 1.3em;
font-weight: normal;
position: absolute;
top: -2.25rem;
left: 0.5rem;
}
tbody td {
width: 100vw;
min-width: 4rem;
max-width: 4rem;
}
tbody th {
width: calc(100% - 12rem);
}
tr[class="total"] {
border-bottom: 4px double #0a0a23;
font-weight: bold;
}
--fcc-editable-region--
--fcc-editable-region--
```

View File

@ -0,0 +1,74 @@
---
id: 612e8279827a28352ce83a72
title: Step 7
challengeType: 0
dashedName: step-7
---
# --description--
Ora copia il set di sette elementi `.key` e incolla altri due set nel div `.keys`.
# --hints--
Dovresti avere 21 elementi `.key`.
```js
const keys = document.querySelectorAll('.key');
assert(keys?.length === 21);
```
Dovresti avere 15 elementi `.black--key`.
```js
const blackKeys = document.querySelectorAll('.black--key');
assert(blackKeys?.length === 15);
```
Tutti gli elementi `.key` dovrebbero essere all'interno dell'elemento `.keys`.
```js
const keys = document.querySelector('.keys');
assert(keys?.querySelectorAll('.key')?.length === 21);
```
Tutti gli elementi `.black--key` dovrebbero essere all'interno dell'elemento `.keys`.
```js
const keys = document.querySelector('.keys');
assert(keys?.querySelectorAll('.black--key')?.length === 15);
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Piano</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
--fcc-editable-region--
<div id="piano">
<div class="keys">
<div class="key"></div>
<div class="key black--key"></div>
<div class="key black--key"></div>
<div class="key"></div>
<div class="key black--key"></div>
<div class="key black--key"></div>
<div class="key black--key"></div>
</div>
</div>
--fcc-editable-region--
</body>
</html>
```
```css
```

View File

@ -0,0 +1,139 @@
---
id: 612ebf9a210f2b6d77001e68
title: Step 30
challengeType: 0
dashedName: step-30
---
# --description--
Ora aggiungi un selettore `.logo` alla `@media` query e imposta la proprietà `width` a `150px`.
# --hints--
La `@media` query dovrebbe avere un selettore `.logo`.
```js
const rules = new __helpers.CSSHelp(document).getRuleListsWithinMedia('(max-width: 768px)');
const logo = rules?.find(rule => rule.selectorText === '.logo');
assert(logo);
```
Il tuo nuovo selettore `.logo` dovrebbe avere una `width` di `150px`.
```js
const rules = new __helpers.CSSHelp(document).getRuleListsWithinMedia('(max-width: 768px)');
const logo = rules?.find(rule => rule.selectorText === '.logo');
assert(logo?.style.width === '150px');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Piano</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./styles.css">
</head>
<body>
<div id="piano">
<img class="logo" src="https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg" alt="freeCodeCamp Logo" />
<div class="keys">
<div class="key"></div>
<div class="key black--key"></div>
<div class="key black--key"></div>
<div class="key"></div>
<div class="key black--key"></div>
<div class="key black--key"></div>
<div class="key black--key"></div>
<div class="key"></div>
<div class="key black--key"></div>
<div class="key black--key"></div>
<div class="key"></div>
<div class="key black--key"></div>
<div class="key black--key"></div>
<div class="key black--key"></div>
<div class="key"></div>
<div class="key black--key"></div>
<div class="key black--key"></div>
<div class="key"></div>
<div class="key black--key"></div>
<div class="key black--key"></div>
<div class="key black--key"></div>
</div>
</div>
</body>
</html>
```
```css
html {
box-sizing: border-box;
}
*, *::before, *::after {
box-sizing: inherit;
}
#piano {
background-color: #00471b;
width: 992px;
height: 290px;
margin: 80px auto;
padding: 90px 20px 0 20px;
position: relative;
border-radius: 10px;
}
.keys {
background-color: #040404;
width: 949px;
height: 180px;
padding-left: 2px;
}
.key {
background-color: #ffffff;
position: relative;
width: 41px;
height: 175px;
margin: 2px;
float: left;
border-radius: 0 0 3px 3px;
}
.key.black--key::after {
background-color: #1d1e22;
content: "";
position: absolute;
left: -18px;
width: 32px;
height: 100px;
border-radius: 0 0 3px 3px;
}
.logo {
width: 200px;
position: absolute;
top: 23px;
}
--fcc-editable-region--
@media (max-width: 768px) {
#piano {
width: 335px;
}
.keys {
width: 318px;
}
}
--fcc-editable-region--
```

View File

@ -0,0 +1,74 @@
---
id: 60a3e3396c7b40068ad6997a
title: Step 17
challengeType: 0
dashedName: step-17
---
# --description--
Scrivi una nuova regola che seleziona `.one` e imposta la sua `width` a 425 pixel.
# --hints--
Dovresti avere un selettore `.one`.
```js
const hasOne = new __helpers.CSSHelp(document).getStyle('.one');
assert(hasOne);
```
Dovresti impostare la proprietà `width` su `425px`.
```js
const hasWidth = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style.width === '425px');
assert(hasWidth);
```
Il tuo elemento `.one` dovrebbe avere un valore `width` di `425px`.
```js
const oneWidth = new __helpers.CSSHelp(document).getStyle('.one')?.getPropertyValue('width');
assert(oneWidth === '425px');
```
# --seed--
## --seed-contents--
```css
.canvas {
width: 500px;
height: 600px;
background-color: #4d0f00;
}
.frame {
border: 50px solid black;
width: 500px;
padding: 50px;
margin: 20px auto;
}
--fcc-editable-region--
--fcc-editable-region--
```
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Rothko Painting</title>
<link href="./styles.css" rel="stylesheet">
</head>
<body>
<div class="frame">
<div class="canvas">
<div class="one"></div>
</div>
</div>
</body>
</html>
```

View File

@ -0,0 +1,94 @@
---
id: 60a3e3396c7b40068ad69987
title: Step 29
challengeType: 0
dashedName: step-29
---
# --description--
Non sei obbigato a usare i pixel quando dimensioni un elemento.
Crea una nuova regola, `.three`e imposta la sua `width` a `91%`.
# --hints--
Dovresti utilizzare il selettore `.three`.
```js
const hasThree = new __helpers.CSSHelp(document).getStyle('.three');
assert(hasThree);
```
Dovresti impostare la proprietà `width` a `91%`.
```js
const hasWidth = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style.width === '91%');
assert(hasWidth);
```
L'elemento `#box-1` dovrebbe avere un valore `flex-basis` di `10em`.
```js
const threeWidth = new __helpers.CSSHelp(document).getStyle('.three')?.getPropertyValue('width');
assert(threeWidth === '91%');
```
# --seed--
## --seed-contents--
```css
.canvas {
width: 500px;
height: 600px;
background-color: #4d0f00;
overflow: hidden;
}
.frame {
border: 50px solid black;
width: 500px;
padding: 50px;
margin: 20px auto;
}
.one {
width: 425px;
height: 150px;
background-color: #efb762;
margin: 20px auto;
}
.two {
width: 475px;
height: 200px;
background-color: #8f0401;
margin: auto;
}
--fcc-editable-region--
--fcc-editable-region--
```
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Rothko Painting</title>
<link href="./styles.css" rel="stylesheet">
</head>
<body>
<div class="frame">
<div class="canvas">
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>
</div>
</div>
</body>
</html>
```

View File

@ -0,0 +1,78 @@
---
id: 615f3e4af8008c5d494d3afe
title: Step 15
challengeType: 0
dashedName: step-15
---
# --description--
Crea un selettore `p` e rimuovi tutti i margini.
# --hints--
Dovresti creare un selettore `p`.
```js
assert(new __helpers.CSSHelp(document).getStyle('p'));
```
Il tuo selettore `p` dovrebbe avere una `margin` impostato a `0`.
```js
assert(new __helpers.CSSHelp(document).getStyle('p')?.margin === '0px');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Nutrition Label</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,800" rel="stylesheet">
<link href="./styles.css" rel="stylesheet">
</head>
<body>
<div class="label">
<h1>Nutrition Facts</h1>
<p>8 servings per container</p>
<p>Serving size 2/3 cup (55g)</p>
</div>
</body>
</html>
```
```css
* {
box-sizing: border-box;
}
html {
font-size: 16px;
}
body {
font-family: 'Open Sans', sans-serif;
}
.label {
border: 2px solid black;
width: 270px;
margin: 20px auto;
padding: 0 7px;
}
h1 {
font-weight: 800;
text-align: center;
margin: -4px 0;
}
--fcc-editable-region--
--fcc-editable-region--
```

View File

@ -27,19 +27,19 @@ dashedName: adjust-the-hue-of-a-color
# --hints--
`hsl()` 関数を使って、`green`色を宣言してください。
`hsl()` 関数を使って、色を宣言してください。
```js
assert(code.match(/\.green\s*?{\s*?background-color\s*:\s*?hsl/gi));
```
`hsl()` 関数を使って、`cyan` の色を宣言してください。
`hsl()` 関数を使って、シアンを宣言してください。
```js
assert(code.match(/\.cyan\s*?{\s*?background-color\s*:\s*?hsl/gi));
```
`hsl()` 関数を使って、`blue`色を宣言してください。
`hsl()` 関数を使って、色を宣言してください。
```js
assert(code.match(/\.blue\s*?{\s*?background-color\s*:\s*?hsl/gi));

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

@ -11,7 +11,7 @@ dashedName: change-a-variable-for-a-specific-area
`:root` で変数を作成すると、その変数の値がページ全体に設定されます。
これらの変数を特定のセレクター内で再度設定し上書きすることができます。
これらの変数を特定のセレクター内で再度設定し上書きすることができます。
# --instructions--

View File

@ -8,9 +8,9 @@ dashedName: convert-celsius-to-fahrenheit
# --description--
摂氏から華氏に変換するアルゴリズムは、摂氏温度 × `9/5` + `32` です。
摂氏から華氏に変換する公式は、摂氏温度 × `9/5` + `32` です。
摂氏の温度を表す変数 `celsius` が与えられます。 すでに定義されている変数 `fahrenheit`を使用し、摂氏に相当する華氏温度を代入してください。 上記のアルゴリズムを使用して、摂氏温度を華氏温度に変換してください。
摂氏の温度を表す変数 `celsius` が与えられます。 すでに定義されている変数 `fahrenheit`を使用し、摂氏に相当する華氏温度を代入してください。 上記の公式を使用して、摂氏温度を華氏温度に変換してください。
# --hints--

View File

@ -19,7 +19,7 @@ users.hasOwnProperty('Alan');
# --instructions--
渡されたオブジェクトに `Alan``Jeff``Sarah``Ryan` の 4 つの名前すべてが含まれている場合は true を返し、そうでない場合は false を返すように、関数の記述を完成させてください。
渡されたオブジェクトに `Alan``Jeff``Sarah``Ryan` の 4 つの名前すべてが含まれている場合は `true` を返し、そうでない場合は `false` を返すように、関数の記述を完成させてください。
# --hints--

View File

@ -10,7 +10,7 @@ dashedName: remove-items-using-splice
`shift()``pop()` を使用して、配列の先頭と末尾から要素を削除する方法を学びました。しかし中間のどこかから要素を取り除きたい場合はどうすればよいでしょうか? あるいは、一度に複数の要素を取り除きたい場合はどうすればよいでしょうか? そこで登場するのが `splice()` です。 `splice()` を使用すると、配列の任意の場所から**連続した任意の数の要素を削除する**ことができます。
`splice()` は最大で 3 つのパラメーターを受け取ることができますが、ここでは最初の 2 つだけに注目しましょう。 `splice()` の最初の 2 つのパラメーターは、`splice()` 呼び出ている配列のインデックス (または位置) を表す整数です。 すでに説明したように、配列は*インデックスがゼロから始まる*ため、配列の最初の要素を指定する場合は `0` を使用します。 `splice()` の最初のパラメーターは、要素の削除を開始する配列上のインデックスを表します。 一方、2 番目のパラメータは、削除する要素の数を示します。 例:
`splice()` は最大で 3 つのパラメーターを受け取ることができますが、ここでは最初の 2 つだけに注目しましょう。 `splice()` の最初の 2 つのパラメーターは、`splice()` 呼び出されている配列内の要素のインデックス (または位置) を表す整数です。 すでに説明したように、配列は*インデックスがゼロから始まる*ため、配列の最初の要素を指定する場合は `0` を使用します。 `splice()` の最初のパラメーターは、要素の削除を開始する配列上のインデックスを表します。 一方、2 番目のパラメータは、削除する要素の数を示します。 例:
```js
let array = ['today', 'was', 'not', 'so', 'great'];

View File

@ -20,7 +20,9 @@ dashedName: problem-101-optimum-polynomial
したがって、立方数の数列について次の OP が得られます。
$$\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}$$
明らかに、k ≥ 4 に対して BOP は存在しません。 BOP によって生成された FIT の和 (上では $\color{red}{red}$ で示されています) は、1 + 15 + 58 = 74 となります。 次の 10 次多項式生成関数を考えます。

View File

@ -15,7 +15,10 @@ dashedName: problem-103-special-subset-sums-optimum
与えられた n に対して $S(A)$ が最小化されている集合を、「最適な特殊和集合」と呼ぶことにします。 最初の 5 つの最適な特殊和集合は次のとおりです。
$$\begin{align} & n = 1: \\{1\\} \\\\ & n = 2: \\{1, 2\\} \\\\ & n = 3: \\{2, 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, 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 のとき、ちょうど 3 つの相異なる解があります。
$$\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}$$
相異なる解の数が 1000 を超える最小の `n` の値を求めなさい。

View File

@ -20,7 +20,12 @@ dashedName: problem-109-darts
プレイヤーが現在の得点で終了できることは「チェックアウト」と呼ばれます。チェックアウトでの最高スコアは 170: T20 T20 D25 (トリプルの 20 x 2 とダブルのブル) です。 スコア 6 でチェックアウトする方法は次ように 11 通りあります。
$$\begin{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 \end{array}$$
$$\begin{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 \end{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}$$
しかし、2 進法を使えば 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}$$
ここで、$n^k$ を計算するための最小の乗算回数を $m(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}$$
最初の 5 つの自然数に対応する $x$ の値を下表に示します。

View File

@ -17,13 +17,17 @@ dashedName: problem-150-searching-a-triangular-array-for-a-sub-triangle-having-m
ここでは 1000 段のそのような三角配列を作りたいので、次のように無作為数生成法 (線形合同法と呼ばれます) によって、値の範囲が $±2^{19}$ の擬似乱数 $s_k$ を 500500 個生成します。
$$\begin{align} t := & \\ 0\\\\ \\ & k = 1\\ \text{から}\\ k = 500500 \text{ に対して、}:\\\\ & t := (615949 × t + 797807)\\ \text{mod}\\ 2^{20}\\\\ & s_k := t 219\\\\ \end{align}$$
$$\begin{align} t := & \\ 0\\\\
\\ & k = 1\\ \text{から}\\ k = 500500 \text{ に対して、}:\\\\ & t := (615949 × t + 797807)\\ \text{mod}\\ 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 $$
部分三角形は、配列内の任意の要素から開始し、好きなだけ下へ広げることができます (真下の段の 2 要素を次の段から取り、真下の3 要素をさらにその次の段から取り、それ以降も同様にします)。

View File

@ -12,7 +12,10 @@ $a$, $b$, $p$, $n$ を正の整数とし、$a ≤ b$ を満たすディオファ
$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
例えば、1 による乗算を除くと、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{したがって、} \\; f(9) = 36288 \\\\ & 10! = 3628800 \\; \text{したがって、} \\; f(10) = 36288 \\\\ & 20! = 2432902008176640000 \\; \text{したがって、} \\; f(20) = 17664 \end{align}$$
$$\begin{align} & 9! = 362880 \\; \text{したがって、} \\; f(9) = 36288 \\\\
& 10! = 3628800 \\; \text{したがって、} \\; f(10) = 36288 \\\\ & 20! = 2432902008176640000 \\; \text{したがって、} \\; f(20) = 17664 \end{align}$$
$f(1,000,000,000,000)$ を求めなさい。

View File

@ -18,7 +18,8 @@ dashedName: problem-163-cross-hatched-triangles
大きさ $n$ の三角形に含まれる三角形の数を $T(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
3 本の線分 $L_1$, $L_2$, $L_3$ について考えます。
$$\begin{align} & L_1: (27, 44) \\;\text{から}\\; (12, 32) \\\\ & L_2: (46, 53) \\;\text{から}\\; (17, 62) \\\\ & L_3: (46, 70) \\;\text{から}\\; (22, 40) \\\\ \end{align}$$
$$\begin{align} & L_1: (27, 44) \\;\text{から}\\; (12, 32) \\\\
& L_2: (46, 53) \\;\text{から}\\; (17, 62) \\\\ & L_3: (46, 70) \\;\text{から}\\; (22, 40) \\\\
\end{align}$$
線分 $L_2$ と $L_3$ が真の交点を持つことを確認できます。 なお、$L_3$ の一方の端点 (22, 40) は $L_1$ 上にありますが、これを真の交点とはみなしません。 $L_1$ と $L_2$ に共有点はありません。 したがって、この 3 本の線分には真の交差点が 1 つあります。
次に、5000 本の線分について同じことをします。 このために、"Blum Blum Shub" と呼ばれる擬似乱数法を使用して 20000 個の数を生成します。
$$\begin{align} & s_0 = 290797 \\\\ & s_{n + 1} = s_n × s_n (\text{mod}\\; 50515093) \\\\ & t_n = s_n (\text{mod}\\; 500) \\\\ \end{align}$$
$$\begin{align} & s_0 = 290797 \\\\
& s_{n + 1} = s_n × s_n (\text{mod}\\; 50515093) \\\\ & t_n = s_n (\text{mod}\\; 500) \\\\
\end{align}$$
それぞれの線分を作成するには、4 つの連続数字 $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 @@ $f(0)=1$ と定義し、$n$ を 2 の整数乗の和で表す方法が何通り
例えば、10 を表す方法は次のように 5 通りあるので、$f(10)=5$ です。
$$\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) の連結積」と呼ぶことにします。 注目すべき点として、元の 3 つの数を連結した数 612739854 もまた 1 から 9 のパンデジタル数になっています。

View File

@ -12,7 +12,9 @@ dashedName: >-
正の整数 $n$ について、$n$ の各位 (10 進数) の平方和を $f(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}$$
$0 &lt; n &lt; {10}^{20}$ のとき、$f(n)$ が完全平方数になるような $n$ の総和の下位 9 桁を求めなさい。

View File

@ -10,7 +10,8 @@ dashedName: problem-180-rational-zeros-of-a-function-of-three-variables
任意の整数 $n$ について、次の 3 つの関数を考えます。
$$\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,13 +14,27 @@ dashedName: problem-185-number-mind
例えば、5 桁の秘密の数列について次の推理が与えられます。
$$\begin{align} & 90342 ;2\\;\text{個正しい}\\\\ & 70794 ;0\\;\text{個正しい}\\\\ & 39458 ;2\\;\text{個正しい}\\\\ & 34109 ;1\\;\text{個正しい}\\\\ & 51545 ;2\\;\text{個正しい}\\\\ & 12531 ;1\\;\text{個正しい} \end{align}$$
$$\begin{align} & 90342 ;2\\;\text{個正しい}\\\\
& 70794 ;0\\;\text{個正しい}\\\\ & 39458 ;2\\;\text{個正しい}\\\\
& 34109 ;1\\;\text{個正しい}\\\\ & 51545 ;2\\;\text{個正しい}\\\\
& 12531 ;1\\;\text{個正しい} \end{align}$$
正解の数列は 39542 だけです。
次の推理が与えられたとします。
$$\begin{align} & 5616185650518293 ;2\\;\text{個正しい}\\\\ & 3847439647293047 ;1\\;\text{個正しい}\\\\ & 5855462940810587 ;3\\;\text{個正しい}\\\\ & 9742855507068353 ;3\\;\text{個正しい}\\\\ & 4296849643607543 ;3\\;\text{個正しい}\\\\ & 3174248439465858 ;1\\;\text{個正しい}\\\\ & 4513559094146117 ;2\\;\text{個正しい}\\\\ & 7890971548908067 ;3\\;\text{個正しい}\\\\ & 8157356344118483 ;1\\;\text{個正しい}\\\\ & 2615250744386899 ;2\\;\text{個正しい}\\\\ & 8690095851526254 ;3\\;\text{個正しい}\\\\ & 6375711915077050 ;1\\;\text{個正しい}\\\\ & 6913859173121360 ;1\\;\text{個正しい}\\\\ & 6442889055042768 ;2\\;\text{個正しい}\\\\ & 2321386104303845 ;0\\;\text{個正しい}\\\\ & 2326509471271448 ;2\\;\text{個正しい}\\\\ & 5251583379644322 ;2\\;\text{個正しい}\\\\ & 1748270476758276 ;3\\;\text{個正しい}\\\\ & 4895722652190306 ;1\\;\text{個正しい}\\\\ & 3041631117224635 ;3\\;\text{個正しい}\\\\ & 1841236454324589 ;3\\;\text{個正しい}\\\\ & 2659862637316867 ;2\\;\text{個正しい} \end{align}$$
$$\begin{align} & 5616185650518293 ;2\\;\text{個正しい}\\\\
& 3847439647293047 ;1\\;\text{個正しい}\\\\ & 5855462940810587 ;3\\;\text{個正しい}\\\\
& 9742855507068353 ;3\\;\text{個正しい}\\\\ & 4296849643607543 ;3\\;\text{個正しい}\\\\
& 3174248439465858 ;1\\;\text{個正しい}\\\\ & 4513559094146117 ;2\\;\text{個正しい}\\\\
& 7890971548908067 ;3\\;\text{個正しい}\\\\ & 8157356344118483 ;1\\;\text{個正しい}\\\\
& 2615250744386899 ;2\\;\text{個正しい}\\\\ & 8690095851526254 ;3\\;\text{個正しい}\\\\
& 6375711915077050 ;1\\;\text{個正しい}\\\\ & 6913859173121360 ;1\\;\text{個正しい}\\\\
& 6442889055042768 ;2\\;\text{個正しい}\\\\ & 2321386104303845 ;0\\;\text{個正しい}\\\\
& 2326509471271448 ;2\\;\text{個正しい}\\\\ & 5251583379644322 ;2\\;\text{個正しい}\\\\
& 1748270476758276 ;3\\;\text{個正しい}\\\\ & 4895722652190306 ;1\\;\text{個正しい}\\\\
& 3041631117224635 ;3\\;\text{個正しい}\\\\ & 1841236454324589 ;3\\;\text{個正しい}\\\\
& 2659862637316867 ;2\\;\text{個正しい} \end{align}$$
これらに基づき、唯一の正解である 16 桁の数列を求めなさい。

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}$$
それぞれの正の整数は、三角形の中で最大 8 つの整数と隣接しています。

View File

@ -12,7 +12,17 @@ dashedName: problem-201-subsets-with-a-unique-sum
集合 $B = \\{1,3,6,8,10,11\\}$ を考えてみます。 $B$ には 3 要素からなる部分集合が 20 個あり、それぞれの和は次のとおりです。
$$\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}$$
これらの和には、複数回現れるものと、1 回のみ現れるものがあります。 集合 $A$ について、$A$ の $k$ 個の要素からなる部分集合のうち、その和が全体で 1 回だけ現れるような集合を $U(A,k) と表すことにします。上の例では、$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}$$
パスカルの三角形の上 8 段に 12 個の相異なる数 (1, 2, 3, 4, 5, 6, 7, 10, 15, 20, 21, 35) が含まれていることが分かります。

View File

@ -20,7 +20,11 @@ $t$ も整数であるような分割は「完全」な分割と呼ばれます
下表に、$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}$$
$P(m) &lt; \frac{1}{12\\,345}$ となる最小の $m$ を求めなさい。

View File

@ -12,7 +12,10 @@ dashedName: problem-212-combined-volume-of-cuboids
$C_n$ が次のようなパラメータを持ち、座標軸に平行に置かれた直方体 5000 個の集まりを、$C_1, \ldots, C_{50000}$ とします。
$$\begin{align} & x_0 = S_{6n - 5} \\; \text{mod} \\; 10000 \\\\ & y_0 = S_{6n - 4} \\; \text{mod} \\; 10000 \\\\ & z_0 = S_{6n - 3} \\; \text{mod} \\; 10000 \\\\ & dx = 1 + (S_{6n - 2} \\; \text{mod} \\; 399) \\\\ & dy = 1 + (S_{6n - 1} \\; \text{mod} \\; 399) \\\\ & dz = 1 + (S_{6n} \\; \text{mod} \\; 399) \\\\ \end{align}$$
$$\begin{align} & x_0 = S_{6n - 5} \\; \text{mod} \\; 10000 \\\\
& y_0 = S_{6n - 4} \\; \text{mod} \\; 10000 \\\\ & z_0 = S_{6n - 3} \\; \text{mod} \\; 10000 \\\\
& dx = 1 + (S_{6n - 2} \\; \text{mod} \\; 399) \\\\ & dy = 1 + (S_{6n - 1} \\; \text{mod} \\; 399) \\\\
& dz = 1 + (S_{6n} \\; \text{mod} \\; 399) \\\\ \end{align}$$
ここで、$S_1, \ldots, S_{300000}$ は「ラグ付きフィボナッチ 法」により生成されます。

View File

@ -12,7 +12,11 @@ $φ$ をオイラーのトーティエント関数とします。つまり、自
$φ$ を繰り返すと、それぞれの正の整数が作る鎖の中で値が徐々に小さくなり、最終的に 1 になります。 例えば、 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}$$
これらの鎖のうち 2 つのみが素数から始まり、その和は 12 です。

View File

@ -10,7 +10,8 @@ dashedName: problem-228-minkowski-sums
各頂点 $v_k (k = 1, 2, \ldots, n)$ が次の座標であるような正 $n$ 角形を $S_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年にオイラーは、2 つの平方数の和として表せるのはどのような数字かを証明しました。 ここでは、次の 4 通りのいずれでも表せる数 $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 @@ $A = 1\\,415\\,926\\,535$, $B = 8\\,979\\,323\\,846$ とします。 ここで
$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)$ は第 5 項の ${35}$ 桁目であり、それは 9 です。
ここで、$π$ の小数第 100 位までを $A$ とします。
$$\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}$$
そして、次の 100 桁を $B$ とします。
$$\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
"Blum Blum Shub" 擬似乱数法により次の数列を作ります。
$$ 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) を 5 個振り、出目の上位 3 個の和が 15 になるケースは 1111 通りあります。 その例をいくつか下に示します。
$$\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) を 20 個振り、出目の上位 10 個の和が 70 になるケースは何通りありますか?

View File

@ -16,7 +16,9 @@ dashedName: problem-244-sliders
それぞれの経路について、下記 (擬似コード) によってそのチェックサムが計算されます。
$$\begin{align} & \text{チェックサム} = 0 \\\\ & \text{チェックサム} = (\text{チェックサム} × 243 + m_1) \\; \text{mod} \\; 100\\,000\\,007 \\\\ & \text{チェックサム} = (\text{チェックサム} × 243 + m_2) \\; \text{mod} \\; 100\\,000\\,007 \\\\ & \ldots \\\\ & \text{チェックサム} = (\text{チェックサム} × 243 + m_n) \\; \text{mod} \\; 100\\,000\\,007 \end{align}$$
$$\begin{align} & \text{チェックサム} = 0 \\\\
& \text{チェックサム} = (\text{チェックサム} × 243 + m_1) \\; \text{mod} \\; 100\\,000\\,007 \\\\ & \text{チェックサム} = (\text{チェックサム} × 243 + m_2) \\; \text{mod} \\; 100\\,000\\,007 \\\\
& \ldots \\\\ & \text{チェックサム} = (\text{チェックサム} × 243 + m_n) \\; \text{mod} \\; 100\\,000\\,007 \end{align}$$
ここで、$m_k$ は移動を表す文字列の $k$ 番目の文字の ASCII コード値です。この移動の 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} = x_k$ になったら止めます。
$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$ なので、ここで止めます。 したがって、ほんの 2 回繰り返すだけで、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{$m = 0$ の場合} \\\\ A(m - 1, 1) & \text{$m > 0$ かつ $n = 0$ の場合} \\\\ A(m - 1, A(m, n - 1)) & \text{$m > 0$ かつ $n > 0$ の場合} \end{cases}$$
$$A(m, n) = \begin{cases} n + 1 & \text{$m = 0$ の場合} \\\\
A(m - 1, 1) & \text{$m > 0$ かつ $n = 0$ の場合} \\\\ A(m - 1, A(m, n - 1)) & \text{$m > 0$ かつ $n > 0$ の場合} \end{cases}$$
例えば、$A(1, 0) = 2$, $A(2, 2) = 7$, $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 @@ $S_n$ のすべての頂点をちょうど 1 回ずつ通る循環路の数を
次のことも確認できます。
$$\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}$$
これらの累乗の分数部を見ると、先頭で連続している 9 の個数が非減少であるように見えます。 実際に、$n$ が大きいと ${(\sqrt{2} + \sqrt{3})}^{2n}$ の小数部が 1 に近付くということを証明できます。

View File

@ -12,7 +12,9 @@ $3×3×n$ の塔を $2×1×1×1$ のブロックで埋める方法が何通り
次に例を示します ($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
すべての整数 $n$ について、実数の無限数列 $a(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 であり、次の 2 つの分割があります。
$$\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}$$
$n$ の有効な分割の数を $P(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{$t_{i - 1}$ が偶数の場合} \\\\ \left\lfloor\frac{t_{i - 1}}{2}\right\rfloor \oplus 926252, & \text{$t_{i - 1}$ が奇数の場合} \end{cases} \\\\ & \qquad \text{ここで、$⌊x⌋$ は床関数、$\oplus$ はビット排他論理和演算子} \\\\ & 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{$t_{i - 1}$ が偶数の場合} \\\\
\left\lfloor\frac{t_{i - 1}}{2}\right\rfloor \oplus 926252, & \text{$t_{i - 1}$ が奇数の場合} \end{cases} \\\\
& \qquad \text{ここで、$⌊x⌋$ は床関数、$\oplus$ はビット排他論理和演算子} \\\\ & b_i = (t_i\bmod 2^{11}) + 1 \end{align}$$
最後の数列に含まれる最初の 2 項は $b_1 = 289$ と $b_2 = 145$ です。 隣り合う 2 つのボウルでそれぞれ $b_1$ 個と $b_2$ 個の豆から始めると、ゲームを終えるまでに 3419100 回動かす必要があります。

View File

@ -10,7 +10,8 @@ dashedName: problem-340-crazy-function
固定小数点整数 $a$, $b$, $c$ について、クレイジー関数 (crazy function) $F(n)$ を次のように定義します。
$$\begin{align} & F(n) = n - c \\;\text{ (すべての } n > b \text{ に対して)}\\\\ & F(n) = F(a + F(a + F(a + F(a + n)))) \\;\text{ (すべての } n ≤ b \text{ に対して)} \end{align}$$
$$\begin{align} & F(n) = n - c \\;\text{ (すべての } n > b \text{ に対して)}\\\\
& F(n) = F(a + F(a + F(a + F(a + n)))) \\;\text{ (すべての } n ≤ b \text{ に対して)} \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)$ 回現れるような、自然数の非減少数列です。 最初の数個の $n$ に対する $G(n)$ の値を次に示します。
$$\begin{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}$$
$$\begin{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}$$
このような回文数のうち最小の数 5 つの和を求めなさい。

View File

@ -16,7 +16,9 @@ dashedName: problem-350-constraining-the-least-greatest-and-the-greatest-least
$gcd ≥ G$ かつ $lcm ≤ L$ を満たすサイズ $N$ のリストの個数を $f(G, L, N)$ とします。 例えば、次のようになります。
$$\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 @@ $n$ 桁の巡回数は非常に興味深い性質を持っています:
最小の巡回数は、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}$$
次の巡回数は、16 桁の 0588235294117647 です。
$$\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$ 番目の人が $f$ 階の $r$ 号室を取る場合は $n$、誰もその部屋を取らない場合は 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}$$
$f × r = 71\\,328\\,803\\,586\\,048$ となるすべての正の数 $f$, $r$ について $P(f, r)$ の総和を求め、下位 8 桁を答えなさい。

View File

@ -20,7 +20,8 @@ $\\{T_n\\}$ の最初のいくつかの項が次のように与えられます:
$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}$$
$i ≤ j$ に対する数 $S_i, S_{i + 1}, \ldots, S_j$ のうちの最小数を $A(i, j)$ とします。 $1 ≤ i ≤ j ≤ N$ のとき、$M(N) = \sum A(i, j)$ とします。

View File

@ -10,7 +10,9 @@ dashedName: problem-376-nontransitive-sets-of-dice
通常とは異なる目を持つ、以下のようなサイコロの集合について考えます。
$$\begin{array}{} \text{サイコロ A: } & 1 & 4 & 4 & 4 & 4 & 4 \\\\ \text{サイコロ B: } & 2 & 2 & 2 & 5 & 5 & 5 \\\\ \text{サイコロ C: } & 3 & 3 & 3 & 3 & 3 & 6 \\\\ \end{array}$$
$$\begin{array}{} \text{サイコロ A: } & 1 & 4 & 4 & 4 & 4 & 4 \\\\
\text{サイコロ B: } & 2 & 2 & 2 & 5 & 5 & 5 \\\\ \text{サイコロ C: } & 3 & 3 & 3 & 3 & 3 & 6 \\\\
\end{array}$$
ゲームでは、2 人のプレイヤーが交互にサイコロを選び、振ります。 最大の目を出したプレイヤーが勝者です。

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 @@ $b(n)$ の総和数列 $s(n) = \displaystyle\sum_{i = 0}^{n} b(i)$ も考えま
これらの数列の最初のいくつかの組み合わせは次のようになります。
$$\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 @@ $s(n)$ の中で $t$ が $c$ 回目に現れたときの $s(n)$ 内でのイン
$F(n)$ を、以下の式で定義されるフィボナッチ数列とします。
$$\begin{align} & F(0) = F(1) = 1 \text{かつ} \\\\ & n > 1 \text{のとき} F(n) = F(n - 1) + F(n - 2) \end{align}$$
$$\begin{align} & F(0) = F(1) = 1 \text{かつ} \\\\
& n > 1 \text{のとき} F(n) = F(n - 1) + F(n - 2) \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_1 = F_2 = 1$ を初期条件とするフィボナッチ数 $F_k = F_{k - 1} + F_{k - 2}$ を $F_k$ と定義します。

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.16666\ldots$ を意味し、1 桁の循環節を持ちます。 $\frac{1}{7}$ には 6 桁の循環節があることが分かります。

View File

@ -12,11 +12,14 @@ dashedName: problem-420-2x2-positive-integer-matrix
一部の正整数行列中は、正整数行列の 2 乗として 2 通りに表すことができます。 次に例を示します。
$$\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$$
対角和が N 未満であり、かつ、正整数行列の 2 乗として 2 通りに表せる 2x2 の正整数行列の個数を $F(N)$ とします。

View File

@ -14,7 +14,8 @@ $n$ を正の整数とします。
例えば、$n = 7$、サイコロの出目が (1, 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}$$
したがって、(1, 1, 5, 6, 6, 6, 3) のとき、$c = 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
$x_0$ と $y_0$ の最大公約数をユークリッドの互除法によって決定するために必要なステップ数を、$E(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)$ は $y_n = 0$ となるような最小の $n$ です。

View File

@ -16,7 +16,11 @@ $n$ が 0 から 9 のとき、$8^n$ mod 11 を求めると 1, 8, 9, 6, 4, 10, 3
よく見ると次のことが分かります。
$$\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 @@ $1 ≤ a, b, c ≤ L$ のとき、三重和 $\sum_{a, b, c} gcd(T(c^a), T(c^b))$
例えば、次のようになります。
$$\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, \\\\ & n > 4 \text{ のとき、} g(n) = g(n-1) + gcd(n, g(n - 1)) \end{align}$$
$$\begin{align} & g(4) = 13, \\\\
& n > 4 \text{ のとき、} g(n) = g(n-1) + gcd(n, g(n - 1)) \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
それらの数の 15 を法とするモジュラ逆数は、1, 8, 4, 13, 2, 11, 7, 14 です。理由は次のとおりです。
$$\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}$$
$m$ の $n$ を法とするモジュラ逆数が $m$ 自体に等しくなるような、$n - 1$ 未満の最大の正の数 $m$ を $I(n)$ とします。

View File

@ -12,7 +12,9 @@ $n^x$ の下位 9 桁が $x$ (先行ゼロを含む) になるような ${10}^9$
次に例を示します。
$$\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}$$
$2 ≤ n ≤ {10}^6$ のとき、$\sum f(n)$ を求めなさい。

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 @@ $P_n$ に含まれる点を頂点とし、かつ原点を内包するような
例:
$$\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)$ を求めなさい。

View File

@ -10,7 +10,9 @@ dashedName: problem-463-a-weird-recurrence-relation
すべての正の整数に対して関数 $f$ が次のように定義されます。
$$\begin{align} & f(1) = 1 \\\\ & f(3) = 3 \\\\ & f(2n) = f(n) \\\\ & f(4n + 1) = 2f(2n + 1) - f(n) \\\\ & f(4n + 3) = 3f(2n + 1) - 2f(n) \end{align}$$
$$\begin{align} & f(1) = 1 \\\\
& f(3) = 3 \\\\ & f(2n) = f(n) \\\\
& f(4n + 1) = 2f(2n + 1) - f(n) \\\\ & f(4n + 3) = 3f(2n + 1) - 2f(n) \end{align}$$
関数 $S(n)$ は $\sum_{i=1}^{n} f(i)$ と定義されます。

View File

@ -12,13 +12,17 @@ $m×n$ の掛け算表の相異なる項の個数を $P(m,n)$ とします。
例えば、3×4 の掛け算表は次のようになります。
$$\begin{array}{c} × & \mathbf{1} & \mathbf{2} & \mathbf{3} & \mathbf{4} \\\\ \mathbf{1} & 1 & 2 & 3 & 4 \\\\ \mathbf{2} & 2 & 4 & 6 & 8 \\\\ \mathbf{3} & 3 & 6 & 9 & 12 \end{array}$$
$$\begin{array}{c} × & \mathbf{1} & \mathbf{2} & \mathbf{3} & \mathbf{4} \\\\
\mathbf{1} & 1 & 2 & 3 & 4 \\\\ \mathbf{2} & 2 & 4 & 6 & 8 \\\\
\mathbf{3} & 3 & 6 & 9 & 12 \end{array}$$
8 つの相異なる項 {1, 2, 3, 4, 6, 8, 9, 12} があるので、$P(3, 4) = 8$ です。
次が与えられます。
$$\begin{align} & P(64, 64) = 1\\,263\\\\ & P(12, 345) = 1\\,998 \text{ および} \\\\ & P(32, {10}^{15}) = 13\\,826\\,382\\,602\\,124\\,302 \\\\ \end{align}$$
$$\begin{align} & P(64, 64) = 1\\,263\\\\
& P(12, 345) = 1\\,998 \text{ および} \\\\ & P(32, {10}^{15}) = 13\\,826\\,382\\,602\\,124\\,302 \\\\
\end{align}$$
$P(64, {10}^{16})$ を求めなさい。

View File

@ -14,15 +14,18 @@ dashedName: problem-467-superinteger
$p(n)$ を $n$ 番目の素数とし、$c(n)$ を $n$ 番目の合成数とします。 例えば、$p(1) = 2$, $p(10) = 29$, $c(1) = 4$, $c(10) = 18$ です。
$$\begin{align} & \\{p(i) : i ≥ 1\\} = \\{2, 3, 5, 7, 11, 13, 17, 19, 23, 29, \ldots \\} \\\\ & \\{c(i) : i ≥ 1\\} = \\{4, 6, 8, 9, 10, 12, 14, 15, 16, 18, \ldots \\} \end{align}$$
$$\begin{align} & \\{p(i) : i ≥ 1\\} = \\{2, 3, 5, 7, 11, 13, 17, 19, 23, 29, \ldots \\} \\\\
& \\{c(i) : i ≥ 1\\} = \\{4, 6, 8, 9, 10, 12, 14, 15, 16, 18, \ldots \\} \end{align}$$
$\\{p(i)\\}$ の数字根からなる数列を $P^D$ とすると、次のようになります ($C^D$ は $\\{c(i)\\}$ に対して同様に定義されます)。
$$\begin{align} & P^D = \\{2, 3, 5, 7, 2, 4, 8, 1, 5, 2, \ldots \\} \\\\ & C^D = \\{4, 6, 8, 9, 1, 3, 5, 6, 7, 9, \ldots \\} \end{align}$$
$$\begin{align} & P^D = \\{2, 3, 5, 7, 2, 4, 8, 1, 5, 2, \ldots \\} \\\\
& C^D = \\{4, 6, 8, 9, 1, 3, 5, 6, 7, 9, \ldots \\} \end{align}$$
$P^D$ の最初の $n$ 個の要素をつなげた整数を $P_n$ とします ($C_n$ は $C^D$ に対して同様に定義されます)。
$$\begin{align} & P_{10} = 2\\,357\\,248\\,152 \\\\ & C_{10} = 4\\,689\\,135\\,679 \end{align}$$
$$\begin{align} & P_{10} = 2\\,357\\,248\\,152 \\\\
& C_{10} = 4\\,689\\,135\\,679 \end{align}$$
$P_n$ と $C_n$ の共通の超越整数である最小の正の整数を、$f(n)$ とします。 例えば、$f(10) = 2\\,357\\,246\\,891\\,352\\,679$, $f(100)\bmod 1\\,000\\,000\\,007 = 771\\,661\\,825$ です。

View File

@ -14,13 +14,15 @@ $n$ の最大の B-smooth 約数を $SB(n)$ とします。
例:
$$\begin{align} & S_1(10) = 1 \\\\ & S_4(2\\,100) = 12 \\\\ & S_{17}(2\\,496\\,144) = 5\\,712 \end{align}$$
$$\begin{align} & S_1(10) = 1 \\\\
& S_4(2\\,100) = 12 \\\\ & S_{17}(2\\,496\\,144) = 5\\,712 \end{align}$$
$F(n) = \displaystyle\sum_{B = 1}^n \sum_{r = 0}^n S_B(\displaystyle\binom{n}{r})$ と定義します。 ここで、$\displaystyle\binom{n}{r}$ は二項係数を表します。
例:
$$\begin{align} & F(11) = 3132 \\\\ & F(1\\,111)\bmod 1\\,000\\,000\\,993 = 706\\,036\\,312 \\\\ & F(111\\,111)\bmod 1\\,000\\,000\\,993 = 22\\,156\\,169 \end{align}$$
$$\begin{align} & F(11) = 3132 \\\\
& F(1\\,111)\bmod 1\\,000\\,000\\,993 = 706\\,036\\,312 \\\\ & F(111\\,111)\bmod 1\\,000\\,000\\,993 = 22\\,156\\,169 \end{align}$$
$F(11\\,111\\,111)\bmod 1\\,000\\,000\\,993$ を求めなさい。

View File

@ -16,7 +16,21 @@ $$\mathbf{\text{thereisasyetinsufficientdataforameaningfulanswer}}$$
そのリストには以下が含まれるでしょう。
$$\begin{align} & 1: \text{a} \\\\ & 2: \text{aa} \\\\ & 3: \text{aaa} \\\\ & 4: \text{aaaa} \\\\ & 5: \text{aaaaa} \\\\ & 6: \text{aaaaaa} \\\\ & 7: \text{aaaaaac} \\\\ & 8: \text{aaaaaacd} \\\\ & 9: \text{aaaaaacde} \\\\ & 10: \text{aaaaaacdee} \\\\ & 11: \text{aaaaaacdeee} \\\\ & 12: \text{aaaaaacdeeee} \\\\ & 13: \text{aaaaaacdeeeee} \\\\ & 14: \text{aaaaaacdeeeeee} \\\\ & 15: \text{aaaaaacdeeeeeef} \\\\ & 16: \text{aaaaaacdeeeeeeg} \\\\ & 17: \text{aaaaaacdeeeeeeh} \\\\ & \ldots \\\\ & 28: \text{aaaaaacdeeeeeey} \\\\ & 29: \text{aaaaaacdeeeeef} \\\\ & 30: \text{aaaaaacdeeeeefe} \\\\ & \ldots \\\\ & 115246685191495242: \text{euleoywuttttsss} \\\\ & 115246685191495243: \text{euler} \\\\ & 115246685191495244: \text{eulera} \\\\ & ... \\\\ & 525069350231428029: \text{ywuuttttssssrrr} \\\\ \end{align}$$
$$\begin{align} & 1: \text{a} \\\\
& 2: \text{aa} \\\\ & 3: \text{aaa} \\\\
& 4: \text{aaaa} \\\\ & 5: \text{aaaaa} \\\\
& 6: \text{aaaaaa} \\\\ & 7: \text{aaaaaac} \\\\
& 8: \text{aaaaaacd} \\\\ & 9: \text{aaaaaacde} \\\\
& 10: \text{aaaaaacdee} \\\\ & 11: \text{aaaaaacdeee} \\\\
& 12: \text{aaaaaacdeeee} \\\\ & 13: \text{aaaaaacdeeeee} \\\\
& 14: \text{aaaaaacdeeeeee} \\\\ & 15: \text{aaaaaacdeeeeeef} \\\\
& 16: \text{aaaaaacdeeeeeeg} \\\\ & 17: \text{aaaaaacdeeeeeeh} \\\\
& \ldots \\\\ & 28: \text{aaaaaacdeeeeeey} \\\\
& 29: \text{aaaaaacdeeeeef} \\\\ & 30: \text{aaaaaacdeeeeefe} \\\\
& \ldots \\\\ & 115246685191495242: \text{euleoywuttttsss} \\\\
& 115246685191495243: \text{euler} \\\\ & 115246685191495244: \text{eulera} \\\\
& ... \\\\ & 525069350231428029: \text{ywuuttttssssrrr} \\\\
\end{align}$$
$P(w)$ を、単語 $w$ の位置とします。
@ -26,7 +40,9 @@ $P(w)$ と $W(p)$ は逆元であることがわかります。つまり、$P(W(
例:
$$\begin{align} & W(10) = \text{ aaaaaacdee} \\\\ & P(\text{aaaaaacdee}) = 10 \\\\ & W(115246685191495243) = \text{ euler} \\\\ & P(\text{euler}) = 115246685191495243 \\\\ \end{align}$$
$$\begin{align} & W(10) = \text{ aaaaaacdee} \\\\
& P(\text{aaaaaacdee}) = 10 \\\\ & W(115246685191495243) = \text{ euler} \\\\
& P(\text{euler}) = 115246685191495243 \\\\ \end{align}$$
$$W(P(\text{legionary}) + P(\text{calorimeters}) - P(\text{annihilate}) + P(\text{orchestrated}) - P(\text{fluttering}))$$ を求めなさい。

View File

@ -14,11 +14,15 @@ $$1! + 4! + 5! = 1 + 24 + 120 = 145$$
169 にはあまり知られていない性質があります。169 は、その数自体に戻るまでの数の連鎖が最長です。このようなループは次の 3 つしか存在しません。
$$\begin{align} &169 → 363601 → 1454 → 169\\\\ &871 → 45361 → 871\\\\ &872 → 45362 → 872\\\\ \end{align}$$
$$\begin{align} &169 → 363601 → 1454 → 169\\\\
&871 → 45361 → 871\\\\ &872 → 45362 → 872\\\\
\end{align}$$
どの数から始めても最終的にはループに入るということを証明するのは難しくありません。 下に例を挙げます。
$$\begin{align} &69 → 363600 → 1454 → 169 → 363601\\ (→ 1454)\\\\ &78 → 45360 → 871 → 45361\\ (→ 871)\\\\ &540 → 145\\ (→ 145)\\\\ \end{align}$$
$$\begin{align} &69 → 363600 → 1454 → 169 → 363601\\ (→ 1454)\\\\
&78 → 45360 → 871 → 45361\\ (→ 871)\\\\ &540 → 145\\ (→ 145)\\\\
\end{align}$$
69 から始めると 5 つの非反復項を持つ連鎖になりますが、100 万より小さい数から始めると、最長の非反復連鎖は 60 項です。

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