title: Count Strings Can Formed Using B C Given Constraints 1
signature: count_strings_can_formed_using_b_c_given_constraints_1 <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          55L, 
          83271L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          36L, 
          23383L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          69L, 
          164359L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          92L, 
          389483L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          73L, 
          194619L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          16L, 
          2073L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          88L, 
          340869L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          19L, 
          3459L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          66L, 
          143848L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          68L, 
          157319L
      )))
  
  }
  
  main()
source_py: def count_strings_can_formed_using_b_c_given_constraints_1(n):
      return ((1 + (n * 2)) + ((n * ((n * n) - 1)) // 2))
source_cpp: int count_strings_can_formed_using_b_c_given_constraints_1(int n) {
    return 1 + ( n * 2 ) + ( n * ( ( n * n ) - 1 ) / 2 );
  }