title: Count Strings Can Formed Using B C Given Constraints 1
signature: def countStringsCanFormedUsingBCGivenConstraints1(n: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(n: Int, expected: Int): 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(
        55, 
        83271    
      )}")   
  
  
      println(s"TEST-1...${driver(
        36, 
        23383    
      )}")   
  
  
      println(s"TEST-2...${driver(
        69, 
        164359    
      )}")   
  
  
      println(s"TEST-3...${driver(
        92, 
        389483    
      )}")   
  
  
      println(s"TEST-4...${driver(
        73, 
        194619    
      )}")   
  
  
      println(s"TEST-5...${driver(
        16, 
        2073    
      )}")   
  
  
      println(s"TEST-6...${driver(
        88, 
        340869    
      )}")   
  
  
      println(s"TEST-7...${driver(
        19, 
        3459    
      )}")   
  
  
      println(s"TEST-8...${driver(
        66, 
        143848    
      )}")   
  
  
      println(s"TEST-9...${driver(
        68, 
        157319    
      )}")   
  
  }
  
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 );
  }