Created
May 12, 2012 16:59
-
-
Save pogin503/2667617 to your computer and use it in GitHub Desktop.
leap.hs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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