ttaaa

powers haskell

Dec 7th, 2021
611
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module Powers
  2.     (
  3.         powersSimpleSolution
  4.     ) where
  5.  
  6. import Data.List (nub)
  7.  
  8. powersSimpleSolution :: Int -> Int
  9. powersSimpleSolution n = length (nub [(toInteger (a)) ^ (toInteger (b)) | a <- [1 .. n], b <- [1 .. n]])
  10.  
RAW Paste Data