title: Count Strings Can Formed Using B C Given Constraints 1
signature: function countStringsCanFormedUsingBCGivenConstraints1($n) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($n, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($n), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        55, 
        83271));
      
      printf("TEST-1...%s\n",driver(
        36, 
        23383));
      
      printf("TEST-2...%s\n",driver(
        69, 
        164359));
      
      printf("TEST-3...%s\n",driver(
        92, 
        389483));
      
      printf("TEST-4...%s\n",driver(
        73, 
        194619));
      
      printf("TEST-5...%s\n",driver(
        16, 
        2073));
      
      printf("TEST-6...%s\n",driver(
        88, 
        340869));
      
      printf("TEST-7...%s\n",driver(
        19, 
        3459));
      
      printf("TEST-8...%s\n",driver(
        66, 
        143848));
      
      printf("TEST-9...%s\n",driver(
        68, 
        157319));
      
  }
  
  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 );
  }