Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import System.IO
- import Control.Monad
- main = do
- cases <- readLn
- replicateM_ cases $ do
- num <- readLn
- print $ f1 num
- f1 :: Integer -> Integer
- f1 num = sum $ map (\n -> num `div` (5^n)) [1..num]
Add Comment
Please, Sign In to add comment