Skip to content

Commit 3de9bfb

Browse files
committed
MAINT fixed double counting of factors
1 parent f997e6b commit 3de9bfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

euler004.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
main = print $ maximum palindromes
2-
where palindromes = [x*y | x <- [999,998..1], y <- [999,998..1],
2+
where palindromes = [x*y | x <- [100..999], y <- [x..999],
33
(reverse $ show (x*y)) == (show (x*y))]

0 commit comments

Comments
 (0)