Skip to content

Commit fb227ed

Browse files
committed
Add the "Abundant Numbers" hole
1 parent 602b09a commit fb227ed

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

db.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ SET row_security = off;
2222
CREATE TYPE public.hole AS ENUM (
2323
'12-days-of-christmas',
2424
'99-bottles-of-beer',
25+
'abundant-numbers',
2526
'arabic-to-roman',
2627
'brainfuck',
2728
'christmas-trees',

holes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Mathematics
3939
Sequence
4040
========
4141

42+
* Abundant Numbers
4243
* Divisors
4344
* Emirp Numbers
4445
* Evil Numbers

routes/answers.go

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,52 @@ Take one down and pass it around, no more bottles of beer on the wall.
413413
414414
No more bottles of beer on the wall, no more bottles of beer.
415415
Go to the store and buy some more, 99 bottles of beer on the wall.`,
416+
"abundant-numbers": `12
417+
18
418+
20
419+
24
420+
30
421+
36
422+
40
423+
42
424+
48
425+
54
426+
56
427+
60
428+
66
429+
70
430+
72
431+
78
432+
80
433+
84
434+
88
435+
90
436+
96
437+
100
438+
102
439+
104
440+
108
441+
112
442+
114
443+
120
444+
126
445+
132
446+
138
447+
140
448+
144
449+
150
450+
156
451+
160
452+
162
453+
168
454+
174
455+
176
456+
180
457+
186
458+
192
459+
196
460+
198
461+
200`,
416462
"christmas-trees": ` *
417463
***
418464
*****

routes/types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ A Partridge in a Pear Tree.</blockquote>`,
130130
"", "",
131131
"99-bottles-of-beer", "99 Bottles of Beer", "Art", "", "",
132132
"Print the lyrics to the song 99 Bottles of Beer.</p>",
133+
}, {
134+
"", "",
135+
"abundant-numbers", "Abundant Numbers", "Sequence", "", "",
136+
"An abundant number is a number for which the sum of its proper divisors (divisors not including the number itself) is greater than the number itself. For example <b>12</b> is abundant because its proper divisors are <b>1</b>, <b>2</b>, <b>3</b>, <b>4</b>, and <b>6</b> which add up to <b>16</b>.<p>Print all the abundant numbers from <b>1</b> to <b>200</b> inclusive, each on their own line.</p>",
133137
}, {
134138
"", "",
135139
"arabic-to-roman", "Arabic to Roman", "Transform", "", "",

0 commit comments

Comments
 (0)