Guest User

Untitled

a guest
Jul 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. import System.IO
  2. import Control.Monad
  3.  
  4. main = do
  5. cases <- readLn
  6. replicateM_ cases $ do
  7. num <- readLn
  8. print $ f1 num
  9.  
  10. f1 :: Integer -> Integer
  11. f1 num = sum $ map (\n -> num `div` (5^n)) [1..num]
Add Comment
Please, Sign In to add comment