Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
4 lines (4 sloc) 153 Bytes
main = do
let f x = x * (x + 1) `div` 2
lmt = 2 * 10^6
print $ minimum [(abs (f x * f y - lmt), x * y) | x <- [1 .. 1000], y <- [1 .. 1000]]
You can’t perform that action at this time.