title: Triangular Matchstick Number
signature: function triangularMatchstickNumber(x) {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value) {
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual, expected){
      return Math.abs(actual - expected) < 1e-06;
  }
  
  function driver(x, expected){
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(x),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(6, 63.0);
    console.log(`TEST-0...${result}`);
  
    result = driver(25, 975.0);
    console.log(`TEST-1...${result}`);
  
    result = driver(15, 360.0);
    console.log(`TEST-2...${result}`);
  
    result = driver(30, 1395.0);
    console.log(`TEST-3...${result}`);
  
    result = driver(17, 459.0);
    console.log(`TEST-4...${result}`);
  
    result = driver(80, 9720.0);
    console.log(`TEST-5...${result}`);
  
    result = driver(27, 1134.0);
    console.log(`TEST-6...${result}`);
  
    result = driver(13, 273.0);
    console.log(`TEST-7...${result}`);
  
    result = driver(12, 234.0);
    console.log(`TEST-8...${result}`);
  
    result = driver(67, 6834.0);
    console.log(`TEST-9...${result}`);
  
    process.exit(0);
  };
  
  if (require.main === module) {
    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;
  }