title: Sum Subsets Set Formed First N Natural Numbers
signature: sumSubsetsSetFormedFirstNNaturalNumbers :: Integer -> Double
  sumSubsetsSetFormedFirstNNaturalNumbers 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-09
  
  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 (26) (11777605632.0) )
  
      printf "TEST-1...%s\n" (driver (35) (10823317585920.0) )
  
      printf "TEST-2...%s\n" (driver (34) (5111011082240.0) )
  
      printf "TEST-3...%s\n" (driver (22) (530579456.0) )
  
      printf "TEST-4...%s\n" (driver (3) (24.0) )
  
      printf "TEST-5...%s\n" (driver (25) (5452595200.0) )
  
      printf "TEST-6...%s\n" (driver (22) (530579456.0) )
  
source_py: def sum_subsets_set_formed_first_n_natural_numbers(n):
      return (((n * (n + 1)) / 2) * (1 << (n - 1)))
source_cpp: unsigned long long sum_subsets_set_formed_first_n_natural_numbers(int n) {
    return ( n * ( n + 1 ) / 2 ) * ( 1 << ( n - 1 ) );
  }