Skip to content

Instantly share code, notes, and snippets.

@pogin503
Created May 12, 2012 16:59
Show Gist options
  • Select an option

  • Save pogin503/2667617 to your computer and use it in GitHub Desktop.

Select an option

Save pogin503/2667617 to your computer and use it in GitHub Desktop.
leap.hs
uruu :: Int -> Bool
uruu x = (mod x 4) == 0 && (mod x 100) /= 0 || (mod x 400) == 0
-- uruu x = mod x 400 == 0
main = do
s <- getLine
if uruu (read s :: Int)
then putStrLn "YES"
else putStrLn "NO"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment