title: Sum Subsets Set Formed First N Natural Numbers
signature: pub fn sum_subsets_set_formed_first_n_natural_numbers(n: i32) -> f64 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: f64, expected: f64)->bool{
  return (actual - expected).abs() < 1e-09
  }
  pub fn driver(n: i32, expected: f64)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        26, 
        11777605632.0
      ));
      
      println!("TEST-1...{}", driver(
        35, 
        10823317585920.0
      ));
      
      println!("TEST-2...{}", driver(
        34, 
        5111011082240.0
      ));
      
      println!("TEST-3...{}", driver(
        22, 
        530579456.0
      ));
      
      println!("TEST-4...{}", driver(
        3, 
        24.0
      ));
      
      println!("TEST-5...{}", driver(
        25, 
        5452595200.0
      ));
      
      println!("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 ) );
  }