title: Sum Of All Elements Up To Nth Row In A Pascals Triangle 1
signature: class Solution {
  
      public Long sumOfAllElementsUpToNthRowInAPascalsTriangle1(Integer n) {
source_py: def sum_of_all_elements_up_to_nth_row_in_a_pascals_triangle_1(n):
      sum = 0
      sum = (1 << n)
      return (sum - 1)
source_cpp: long long int sum_of_all_elements_up_to_nth_row_in_a_pascals_triangle_1(int n) {
    long long int sum = 0;
    sum = 1 << n;
    return ( sum - 1 );
  }
question_info.extension: java
question_info.entry_fn_name: sumOfAllElementsUpToNthRowInAPascalsTriangle1
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 9007199254740991, "inputs": {"n": 53}}, {"idx": 1, "outputs": 7, "inputs": {"n": 3}}, {"idx": 2, "outputs": 268435455, "inputs": {"n": 28}}, {"idx": 3, "outputs": 17592186044415, "inputs": {"n": 44}}, {"idx": 4, "outputs": 70368744177663, "inputs": {"n": 46}}, {"idx": 5, "outputs": 7, "inputs": {"n": 3}}, {"idx": 6, "outputs": 65535, "inputs": {"n": 16}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer n, Long expected){
          try{
              Driver driver = new Driver();
              if (driver.run(n,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(53, 9007199254740991L);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(3, 7L);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(28, 268435455L);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(44, 17592186044415L);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(46, 70368744177663L);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(3, 7L);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(16, 65535L);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer n, Long expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(n),expected);
      }
      
      public boolean validateSolution(Long actual, Long expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6
question_info.commands: java __FILENAME__