title: Nth Pentagonal Number
signature: nthPentagonalNumber :: Integer -> Double
  nthPentagonalNumber n = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Double -> Double -> Bool
  validateSolution actual expected = do
      (abs (actual-expected)) < 1e-06
  
  driver :: Integer -> Double -> String
  driver n expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME n) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (96) (13776.0) )
  
      printf "TEST-1...%s\n" (driver (93) (12927.0) )
  
      printf "TEST-2...%s\n" (driver (15) (330.0) )
  
      printf "TEST-3...%s\n" (driver (8) (92.0) )
  
      printf "TEST-4...%s\n" (driver (21) (651.0) )
  
      printf "TEST-5...%s\n" (driver (14) (287.0) )
  
      printf "TEST-6...%s\n" (driver (11) (176.0) )
  
      printf "TEST-7...%s\n" (driver (79) (9322.0) )
  
      printf "TEST-8...%s\n" (driver (24) (852.0) )
  
      printf "TEST-9...%s\n" (driver (94) (13207.0) )
  
source_py: def nth_pentagonal_number(n):
      return ((((3 * n) * n) - n) / 2)
source_cpp: int nth_pentagonal_number(int n) {
    return ( 3 * n * n - n ) / 2;
  }