Skip to content

Commit 0219147

Browse files
committed
Add φ, rename 𝑒
Updates #3
1 parent 63510fc commit 0219147

File tree

5 files changed

+21
-12
lines changed

5 files changed

+21
-12
lines changed

routes/answers.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,7 @@ Buzz`,
646646
1 17 136 680 2380 6188 12376 19448 24310 24310 19448 12376 6188 2380 680 136 17 1
647647
1 18 153 816 3060 8568 18564 31824 43758 48620 43758 31824 18564 8568 3060 816 153 18 1
648648
1 19 171 969 3876 11628 27132 50388 75582 92378 92378 75582 50388 27132 11628 3876 969 171 19 1`,
649-
"e": `2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274274663919320030599218174135966290435729003342952605956307381323286279434907632338298807531952510190115738341879307021540891499348841675092447614606680822648001684774118537423454424371075390777449920695517027618386062613313845830007520449338265602976067371132007093287091274437470472306969772093101416928368190255151086574637721112523897844250569536967707854499699679468644549059879316368892300987931277361782154249992295763514822082698951936680331825288693984964651058209392398294887933203625094431173012381970684161403970198376793206832823764648042953118023287825098194558153017567173613320698112509961818815930416903515988885193458072738667385894228792284998920868058257492796104841984443634632449684875602336248270419786232090021609902353043699418491463140934317381436405462531520961836908887070167683964243781405927145635490613031072085103837505101157477041718986106873969655212671546889570350354`,
650649
"π": `3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989`,
650+
"φ": `1.6180339887498948482045868343656381177203091798057628621354486227052604628189024497072072041893911374847540880753868917521266338622235369317931800607667263544333890865959395829056383226613199282902678806752087668925017116962070322210432162695486262963136144381497587012203408058879544547492461856953648644492410443207713449470495658467885098743394422125448770664780915884607499887124007652170575179788341662562494075890697040002812104276217711177780531531714101170466659914669798731761356006708748071013179523689427521948435305678300228785699782977834784587822891109762500302696156170025046433824377648610283831268330372429267526311653392473167111211588186385133162038400522216579128667529465490681131715993432359734949850904094762132229810172610705961164562990981629055520852479035240602017279974717534277759277862561943208275051312181562855122248093947123414517022373580577278616008688382952304592647878017889921990270776903895321968198615143780314997411069260886742962267575605231727775203536139362`,
651+
"𝑒": `2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274274663919320030599218174135966290435729003342952605956307381323286279434907632338298807531952510190115738341879307021540891499348841675092447614606680822648001684774118537423454424371075390777449920695517027618386062613313845830007520449338265602976067371132007093287091274437470472306969772093101416928368190255151086574637721112523897844250569536967707854499699679468644549059879316368892300987931277361782154249992295763514822082698951936680331825288693984964651058209392398294887933203625094431173012381970684161403970198376793206832823764648042953118023287825098194558153017567173613320698112509961818815930416903515988885193458072738667385894228792284998920868058257492796104841984443634632449684875602336248270419786232090021609902353043699418491463140934317381436405462531520961836908887070167683964243781405927145635490613031072085103837505101157477041718986106873969655212671546889570350354`,
651652
}

routes/hole.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ var preambles = map[string]string{
4141
▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲
4242
▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲
4343
▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲</pre>`,
44-
"e": `<h1>e</h1><p>Print e (Euler's number) to the first 1,000 decimal places.</p>`,
4544
"π": `<h1>π</h1><p>Print π (Pi) to the first 1,000 decimal places.</p>`,
45+
"φ": `<h1>φ</h1><p>Print φ (Phi) to the first 1,000 decimal places.</p>`,
46+
"𝑒": `<h1>e</h1><p>Print 𝑒 (Euler's number) to the first 1,000 decimal places.</p>`,
47+
4648
}
4749

4850
func hole(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {

routes/home.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ func home(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
6767
WHEN 'seven-segment' THEN 11
6868
WHEN 'sierpiński-triangle' THEN 12
6969
WHEN 'π' THEN 13
70-
WHEN 'e' THEN 14
71-
WHEN 'arabic-to-roman' THEN 15
72-
WHEN 'roman-to-arabic' THEN 16
73-
WHEN 'spelling-numbers' THEN 17
70+
WHEN 'φ' THEN 14
71+
WHEN '𝑒' THEN 15
72+
WHEN 'arabic-to-roman' THEN 16
73+
WHEN 'roman-to-arabic' THEN 17
74+
WHEN 'spelling-numbers' THEN 18
7475
END, row_number`,
7576
printHeader(w, r, 200),
7677
)
@@ -130,8 +131,6 @@ func home(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
130131
w.Write([]byte(`Medium><a href=99-bottles-of-beer>99 Bottles of Beer`))
131132
case "arabic-to-roman":
132133
w.Write([]byte(`Slow><a href=arabic-to-roman>Arabic to Roman`))
133-
case "e":
134-
w.Write([]byte(`Medium><a href=e>e`))
135134
case "emirp-numbers":
136135
w.Write([]byte(`Fast><a href=emirp-numbers>Emirp Numbers`))
137136
case "evil-numbers":
@@ -162,6 +161,10 @@ func home(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
162161
w.Write([]byte(`Slow><a href=spelling-numbers>Spelling Numbers`))
163162
case "π":
164163
w.Write([]byte(`Medium><a href=π>π`))
164+
case "φ":
165+
w.Write([]byte(`Medium><a href=φ>φ`))
166+
case "𝑒":
167+
w.Write([]byte(`Medium><a href=𝑒>𝑒`))
165168
}
166169

167170
w.Write([]byte(`</a><table>`))

routes/routes.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ func init() {
3131
// TODO Create this with a loop.
3232
Router.GET("/99-bottles-of-beer", middleware.Gzip(hole))
3333
Router.GET("/arabic-to-roman", middleware.Gzip(hole))
34-
Router.GET("/e", middleware.Gzip(hole))
3534
Router.GET("/emirp-numbers", middleware.Gzip(hole))
3635
Router.GET("/evil-numbers", middleware.Gzip(hole))
3736
Router.GET("/fibonacci", middleware.Gzip(hole))
@@ -47,6 +46,8 @@ func init() {
4746
Router.GET("/sierpiński-triangle", middleware.Gzip(hole))
4847
Router.GET("/spelling-numbers", middleware.Gzip(hole))
4948
Router.GET("/π", middleware.Gzip(hole))
49+
Router.GET("/φ", middleware.Gzip(hole))
50+
Router.GET("/𝑒", middleware.Gzip(hole))
5051

5152
Router.POST("/solution", middleware.Gzip(solution))
5253

routes/scores.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ func scores(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
1717
case "all",
1818
"99-bottles-of-beer",
1919
"arabic-to-roman",
20-
"e",
2120
"emirp-numbers",
2221
"evil-numbers",
2322
"fibonacci",
@@ -32,7 +31,9 @@ func scores(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
3231
"seven-segment",
3332
"sierpiński-triangle",
3433
"spelling-numbers",
35-
"π":
34+
"π",
35+
"φ",
36+
"𝑒":
3637
default:
3738
print404(w, r)
3839
return
@@ -57,7 +58,6 @@ func scores(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
5758
{"all", "All Holes"},
5859
{"99-bottles-of-beer", "99 Bottles of Beer"},
5960
{"arabic-to-roman", "Arabic to Roman"},
60-
{"e", "e"},
6161
{"emirp-numbers", "Emirp Numbers"},
6262
{"evil-numbers", "Evil Numbers"},
6363
{"fibonacci", "Fibonacci"},
@@ -73,6 +73,8 @@ func scores(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
7373
{"seven-segment", "Seven Segment"},
7474
{"spelling-numbers", "Spelling Numbers"},
7575
{"π", "π"},
76+
{"φ","φ"},
77+
{"𝑒", "𝑒"},
7678
} {
7779
w.Write([]byte("<option "))
7880
if hole == v[0] {

0 commit comments

Comments
 (0)