title: Count Strings Can Formed Using B C Given Constraints 1
signature: fun countStringsCanFormedUsingBCGivenConstraints1(n: Int): Int {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(55, 83271)
      println("TEST-0...${result}")
      
      result = driver(36, 23383)
      println("TEST-1...${result}")
      
      result = driver(69, 164359)
      println("TEST-2...${result}")
      
      result = driver(92, 389483)
      println("TEST-3...${result}")
      
      result = driver(73, 194619)
      println("TEST-4...${result}")
      
      result = driver(16, 2073)
      println("TEST-5...${result}")
      
      result = driver(88, 340869)
      println("TEST-6...${result}")
      
      result = driver(19, 3459)
      println("TEST-7...${result}")
      
      result = driver(66, 143848)
      println("TEST-8...${result}")
      
      result = driver(68, 157319)
      println("TEST-9...${result}")
      
          
  }
  
  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 );
  }