Skip to content

Instantly share code, notes, and snippets.

@jhedev
Last active August 29, 2015 14:22
Show Gist options
  • Save jhedev/5a4e2b8b97bff98c264c to your computer and use it in GitHub Desktop.
Save jhedev/5a4e2b8b97bff98c264c to your computer and use it in GitHub Desktop.
multiples
module Main where
import Data.List
mult :: Int
mult = sum $ nub [i*x | x <- [3,5], i <- [1..(1000 -1)`div` x]]
main :: IO ()
main = print mult
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment