title: Sum Subsets Set Formed First N Natural Numbers
signature: def sumSubsetsSetFormedFirstNNaturalNumbers(n: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Double , expected: Double): Boolean = {
      (actual - expected).abs < 1e-09
  }
  
  def driver(n: Int, expected: Double): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        26, 
        11777605632.0    
      )}")   
  
  
      println(s"TEST-1...${driver(
        35, 
        10823317585920.0    
      )}")   
  
  
      println(s"TEST-2...${driver(
        34, 
        5111011082240.0    
      )}")   
  
  
      println(s"TEST-3...${driver(
        22, 
        530579456.0    
      )}")   
  
  
      println(s"TEST-4...${driver(
        3, 
        24.0    
      )}")   
  
  
      println(s"TEST-5...${driver(
        25, 
        5452595200.0    
      )}")   
  
  
      println(s"TEST-6...${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 ) );
  }