fix(curriculum): format challenge markdown as per linting rules (#36326)
* fix: Format challenge markdown according to linting rules * fix: Put spaces after section tags
This commit is contained in:
committed by
mrugesh
parent
c387873640
commit
7d4dc382b4
@ -6,22 +6,11 @@ title: 'Problem 221: Alexandrian Integers'
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
We shall call a positive integer A an "Alexandrian integer", if there exist integers p, q, r such that:
|
||||
A = p · q · r and 1/A = 1/p + 1/q + 1/r
|
||||
<!-- TODO Use MathJax -->
|
||||
|
||||
|
||||
A = p · q · r and
|
||||
|
||||
|
||||
1A
|
||||
=
|
||||
|
||||
1p
|
||||
+
|
||||
|
||||
1q
|
||||
+
|
||||
|
||||
1r
|
||||
For example, 630 is an Alexandrian integer (p = 5, q = −7, r = −18).
|
||||
In fact, 630 is the 6th Alexandrian integer, the first 6 Alexandrian integers being: 6, 42, 120, 156, 420 and 630.
|
||||
|
||||
|
@ -6,16 +6,17 @@ title: 'Problem 228: Minkowski Sums'
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
<!-- TODO Use MathJax and re-write from projecteuler.net -->
|
||||
Let Sn be the regular n-sided polygon – or shape – whose vertices
|
||||
|
||||
vk (k = 1,2,…,n) have coordinates:
|
||||
|
||||
xk =
|
||||
cos( 2k-1/n ×180° )
|
||||
xk = cos( 2k-1/n ×180° )
|
||||
|
||||
yk =
|
||||
sin( 2k-1/n ×180° )
|
||||
Each Sn is to be interpreted as a filled shape consisting of all points on the perimeter and in the interior.
|
||||
yk = sin( 2k-1/n ×180° )
|
||||
|
||||
Each Sn is to be interpreted as a filled shape consisting of all points on the perimeter and in the interior.
|
||||
|
||||
The Minkowski sum, S+T, of two shapes S and T is the result of
|
||||
|
||||
|
@ -6,16 +6,17 @@ title: 'Problem 301: Nim'
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
Nim is a game played with heaps of stones, where two players take it in turn to remove any number of stones from any heap until no stones remain.
|
||||
|
||||
We'll consider the three-heap normal-play version of Nim, which works as follows:
|
||||
|
||||
- At the start of the game there are three heaps of stones.
|
||||
- On his turn the player removes any positive number of stones from any single heap.
|
||||
- The first player unable to move (because no stones remain) loses.
|
||||
|
||||
If (n1,n2,n3) indicates a Nim position consisting of heaps of size n1, n2 and n3 then there is a simple function X(n1,n2,n3) — that you may look up or attempt to deduce for yourself — that returns:
|
||||
zero if, with perfect strategy, the player about to move will eventually lose; or
|
||||
non-zero if, with perfect strategy, the player about to move will eventually win.For example X(1,2,3) = 0 because, no matter what the current player does, his opponent can respond with a move that leaves two heaps of equal size, at which point every move by the current player can be mirrored by his opponent until no stones remain; so the current player loses. To illustrate:
|
||||
If (n1,n2,n3) indicates a Nim position consisting of heaps of size n1, n2 and n3 then there is a simple function X(n1,n2,n3) — that you may look up or attempt to deduce for yourself — that returns: zero if, with perfect strategy, the player about to move will eventually lose; or non-zero if, with perfect strategy, the player about to move will eventually win. For example X(1,2,3) = 0 because, no matter what the current player does, his opponent can respond with a move that leaves two heaps of equal size, at which point every move by the current player can be mirrored by his opponent until no stones remain; so the current player loses. To illustrate:
|
||||
|
||||
- current player moves to (1,2,1)
|
||||
- opponent moves to (1,0,1)
|
||||
- current player moves to (0,0,1)
|
||||
|
@ -6,45 +6,24 @@ title: 'Problem 330: Euler''s Number'
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
An infinite sequence of real numbers a(n) is defined for all integers n as follows:
|
||||
|
||||
|
||||
For example,a(0) =
|
||||
11!
|
||||
+
|
||||
12!
|
||||
+
|
||||
13!
|
||||
+ ... = e − 1
|
||||
a(1) =
|
||||
e − 11!
|
||||
+
|
||||
12!
|
||||
+
|
||||
13!
|
||||
+ ... = 2e − 3
|
||||
a(2) =
|
||||
2e − 31!
|
||||
+
|
||||
e − 12!
|
||||
+
|
||||
13!
|
||||
+ ... =
|
||||
72
|
||||
e − 6
|
||||
<!-- TODO Use MathJax and re-write from projecteuler.net -->
|
||||
For example,a(0) = 11! + 12! + 13! + ... = e − 1
|
||||
a(1) = e − 11! + 12! + 13! + ... = 2e − 3
|
||||
a(2) = 2e − 31! + e − 12! + 13! + ... = 72 e − 6
|
||||
|
||||
with e = 2.7182818... being Euler's constant.
|
||||
|
||||
|
||||
It can be shown that a(n) is of the form
|
||||
|
||||
A(n) e + B(n)n!
|
||||
for integers A(n) and B(n).
|
||||
A(n) e + B(n)n!
|
||||
for integers A(n) and B(n).
|
||||
|
||||
For example a(10) =
|
||||
|
||||
328161643 e − 65269448610!
|
||||
.
|
||||
328161643 e − 65269448610!.
|
||||
|
||||
Find A(109) + B(109) and give your answer mod 77 777 777.
|
||||
</section>
|
||||
|
@ -6,6 +6,7 @@ title: 'Problem 334: Spilling the beans'
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
In Plato's heaven, there exist an infinite number of bowls in a straight line.
|
||||
Each bowl either contains some or none of a finite number of beans.
|
||||
A child plays a game, which allows only one kind of move: removing two beans from any bowl, and putting one in each of the two adjacent bowls. The game ends when each bowl contains either one or no beans.
|
||||
@ -13,49 +14,17 @@ A child plays a game, which allows only one kind of move: removing two beans fro
|
||||
For example, consider two adjacent bowls containing 2 and 3 beans respectively, all other bowls being empty. The following eight moves will finish the game:
|
||||
|
||||
|
||||
|
||||
<!-- TODO Use MathJax and re-write from projecteuler.net -->
|
||||
You are given the following sequences:
|
||||
t0 = 123456.
|
||||
|
||||
|
||||
ti =
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ti-12
|
||||
|
||||
,
|
||||
|
||||
|
||||
|
||||
if ti-1 is even
|
||||
|
||||
|
||||
|
||||
ti-12
|
||||
|
||||
|
||||
|
||||
926252,
|
||||
|
||||
|
||||
if ti-1 is odd
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
where ⌊x⌋ is the floor function
|
||||
|
||||
|
||||
|
||||
|
||||
and is the bitwise XOR operator.
|
||||
|
||||
|
||||
bi = ( ti mod 211) + 1.
|
||||
t0 = 123456.
|
||||
ti = ti-12,
|
||||
if ti-1 is even
|
||||
ti-12
|
||||
926252,
|
||||
if ti-1 is odd
|
||||
where ⌊x⌋ is the floor function
|
||||
and is the bitwise XOR operator.
|
||||
bi = ( ti mod 211) + 1.
|
||||
|
||||
The first two terms of the last sequence are b1 = 289 and b2 = 145.
|
||||
If we start with b1 and b2 beans in two adjacent bowls, 3419100 moves would be required to finish the game.
|
||||
|
@ -6,13 +6,16 @@ title: 'Problem 385: Ellipses inside triangles'
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
For any triangle T in the plane, it can be shown that there is a unique ellipse with largest area that is completely inside T.
|
||||
|
||||
|
||||
|
||||
For a given n, consider triangles T such that:
|
||||
|
||||
- the vertices of T have integer coordinates with absolute value ≤ n, and
|
||||
- the foci1 of the largest-area ellipse inside T are (√13,0) and (-√13,0).
|
||||
|
||||
Let A(n) be the sum of the areas of all such triangles.
|
||||
|
||||
|
||||
|
@ -6,15 +6,16 @@ title: 'Problem 443: GCD sequence'
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
Let g(n) be a sequence defined as follows:
|
||||
g(4) = 13,
|
||||
g(n) = g(n-1) + gcd(n, g(n-1)) for n > 4.
|
||||
|
||||
The first few values are:
|
||||
|
||||
n4567891011121314151617181920...
|
||||
g(n)1314161718272829303132333451545560...
|
||||
|
||||
n 4567891011121314151617181920...
|
||||
g(n) 1314161718272829303132333451545560...
|
||||
<!-- TODO Use MathJax -->
|
||||
|
||||
You are given that g(1 000) = 2524 and g(1 000 000) = 2624152.
|
||||
|
||||
|
@ -6,14 +6,16 @@ title: 'Problem 449: Chocolate covered candy'
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
Phil the confectioner is making a new batch of chocolate covered candy. Each candy centre is shaped like an ellipsoid of revolution defined by the equation: b2x2 + b2y2 + a2z2 = a2b2.
|
||||
|
||||
|
||||
Phil wants to know how much chocolate is needed to cover one candy centre with a uniform coat of chocolate one millimeter thick.
|
||||
If a=1 mm and b=1 mm, the amount of chocolate required is
|
||||
|
||||
283
|
||||
π mm3
|
||||
283
|
||||
π mm3
|
||||
<!-- TODO Use MathJax -->
|
||||
|
||||
If a=2 mm and b=1 mm, the amount of chocolate required is approximately 60.35475635 mm3.
|
||||
|
||||
|
@ -6,13 +6,10 @@ title: 'Problem 454: Diophantine reciprocals III'
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
In the following equation x, y, and n are positive integers.
|
||||
|
||||
1x
|
||||
+
|
||||
1y
|
||||
=
|
||||
1n
|
||||
In the following equation x, y, and n are positive integers.
|
||||
1/x + 1/y= 1/n
|
||||
<!-- TODO Use MathJax -->
|
||||
|
||||
For a limit L we define F(L) as the number of solutions which satisfy x < y ≤ L.
|
||||
|
||||
|
@ -6,6 +6,8 @@ title: 'Problem 462: Permutation of 3-smooth numbers'
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
<!-- TODO use MathJax -->
|
||||
A 3-smooth number is an integer which has no prime factor larger than 3. For an integer N, we define S(N) as the set of 3-smooth numbers less than or equal to N . For example, S(20) = { 1, 2, 3, 4, 6, 8, 9, 12, 16, 18 }.
|
||||
|
||||
|
||||
@ -13,10 +15,12 @@ We define F(N) as the number of permutations of S(N) in which each element comes
|
||||
|
||||
|
||||
This is one of the possible permutations for N = 20.
|
||||
- 1, 2, 4, 3, 9, 8, 16, 6, 18, 12.
|
||||
This is not a valid permutation because 12 comes before its divisor 6.
|
||||
- 1, 2, 4, 3, 9, 8, 12, 16, 6, 18.
|
||||
|
||||
- 1, 2, 4, 3, 9, 8, 16, 6, 18, 12.
|
||||
|
||||
This is not a valid permutation because 12 comes before its divisor 6.
|
||||
|
||||
- 1, 2, 4, 3, 9, 8, 12, 16, 6, 18.
|
||||
|
||||
We can verify that F(6) = 5, F(8) = 9, F(20) = 450 and F(1000) ≈ 8.8521816557e21.
|
||||
Find F(1018). Give as your answer its scientific notation rounded to ten digits after the decimal point.
|
||||
|
Reference in New Issue
Block a user