title: Triangular Matchstick Number
signature: triangularMatchstickNumber :: Integer -> Double
  triangularMatchstickNumber x = 
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 x expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME x) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (6) (63.0) )
  
      printf "TEST-1...%s\n" (driver (25) (975.0) )
  
      printf "TEST-2...%s\n" (driver (15) (360.0) )
  
      printf "TEST-3...%s\n" (driver (30) (1395.0) )
  
      printf "TEST-4...%s\n" (driver (17) (459.0) )
  
      printf "TEST-5...%s\n" (driver (80) (9720.0) )
  
      printf "TEST-6...%s\n" (driver (27) (1134.0) )
  
      printf "TEST-7...%s\n" (driver (13) (273.0) )
  
      printf "TEST-8...%s\n" (driver (12) (234.0) )
  
      printf "TEST-9...%s\n" (driver (67) (6834.0) )
  
source_py: def triangular_matchstick_number(x):
      return (((3 * x) * (x + 1)) / 2)
source_cpp: int triangular_matchstick_number(int x) {
    return ( 3 * x * ( x + 1 ) ) / 2;
  }