-
Notifications
You must be signed in to change notification settings - Fork 0
/
projecteuler.html
58 lines (48 loc) · 1.82 KB
/
projecteuler.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
<title>Project Euler Challenges</title>
</head>
<body>
<header>
<h1>Project Euler Challenges</h1>
</header>
<section>
<h2>Problem 1</h2>
<h3>Multiples of 3 and 5</h3>
<p>If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these
multiples is 23.</p>
<p>Find the sum of all the multiples of 3 or 5 below <strong>1000</strong>.</p>
</p>
<input name="multiplesInput" type="number" placeholder="1000"/>
<span class="button" id="multiples">Solve</span>
<span class="answer" id="multiplesAnswer"></span>
</section>
<section>
<h2>Problem 2</h2>
<h3>Even Fibonacci numbers</h3>
<p>Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2,
the first 10 terms will be:</p>
<p>1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...</p>
<p>By considering the terms in the Fibonacci sequence whose values do not exceed <strong>4000000</strong>, find the
sum of the even-valued terms.</p>
<input name="fibonacciInput" type="number" placeholder="4000000"/>
<span class="button" id="fibonacci">Solve</span>
<span class="answer" id="fibonacciAnswer"></span>
</section>
<section>
<h2>Problem 3</h2>
<h3>Largest prime factor</h3>
<p>The prime factors of 13195 are 5, 7, 13 and 29.</p>
<p>What is the largest prime factor of the number <strong>600851475143</strong>?
</p>
<input name="primeInput" type="number" placeholder="600851475143"/>
<span class="button" id="prime">Solve</span>
<span class="answer" id="primeAnswer"></span>
</section>
<script src="js/projecteuler.js"></script>
</body>
</html>