Skip to content
Newer
Older
100644 8 lines (7 sloc) 175 Bytes
0329b7f solved #28
Eric Wilson authored Feb 18, 2011
1 corners :: Int -> Int
2 corners n = (4 * oddSquare) - (6 * even)
3 where
4 oddSquare = n^2
5 even = n-1
6
7 euler28 :: Int -> Int
8 euler28 size = 1 + (sum $ map corners [3,5..size])
Something went wrong with that request. Please try again.