import Data.Time.Calendar main :: IO () main = do let ds = [fromGregorian 2015 1 1 .. fromGregorian 2015 12 31] let hds = [d |d<-ds, isHappyDay $ toGregorian d] putStrLn . show $ length hds where isHappyDay (_,m,d) = d `div` 10 + d `mod` 10 == m