Permalink
Browse files

solved #28

  • Loading branch information...
1 parent d9afe2b commit 0329b7faecd174dda90903eea5dd83842ddc965d Eric Wilson committed Feb 18, 2011
Showing with 9 additions and 0 deletions.
  1. +8 −0 028.hs
  2. +1 −0 README
View
8 028.hs
@@ -0,0 +1,8 @@
+corners :: Int -> Int
+corners n = (4 * oddSquare) - (6 * even)
+ where
+ oddSquare = n^2
+ even = n-1
+
+euler28 :: Int -> Int
+euler28 size = 1 + (sum $ map corners [3,5..size])
View
1 README
@@ -27,4 +27,5 @@ Here's the current status: (No status listed if no code is checked in.)
#22: SOLVED
#24: SOLVED
#25: SOLVED
+#28: SOLVED
#67: SOLVED

0 comments on commit 0329b7f

Please sign in to comment.