title: Triangular Matchstick Number
signature: fun triangularMatchstickNumber(x: Int): Float {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Float, expected:Float):Boolean{
    return abs(actual - expected) < 1e-06f
  }
  fun driver(x: Int, expected:Float):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(x), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(6, 63.0f)
      println("TEST-0...${result}")
      
      result = driver(25, 975.0f)
      println("TEST-1...${result}")
      
      result = driver(15, 360.0f)
      println("TEST-2...${result}")
      
      result = driver(30, 1395.0f)
      println("TEST-3...${result}")
      
      result = driver(17, 459.0f)
      println("TEST-4...${result}")
      
      result = driver(80, 9720.0f)
      println("TEST-5...${result}")
      
      result = driver(27, 1134.0f)
      println("TEST-6...${result}")
      
      result = driver(13, 273.0f)
      println("TEST-7...${result}")
      
      result = driver(12, 234.0f)
      println("TEST-8...${result}")
      
      result = driver(67, 6834.0f)
      println("TEST-9...${result}")
      
          
  }
  
  main()
source_py: def triangular_matchstick_number(x):
      return (((3 * x) * (x + 1)) / 2)
source_cpp: int triangular_matchstick_number(int x) {
    return ( 3 * x * ( x + 1 ) ) / 2;
  }