a guest Aug 30th, 2010 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- nbFactors 1 _ = 
- nbFactors x (p:ps) = exponent : nbFactors rest ps where
- (exponent,rest) = countClean 0 x
- countClean e y = case divMod y p of
- (y',0) -> countClean (e+1) y'
- _ -> (e,y)
RAW Paste Data