title: Triangular Matchstick Number
signature: triangularMatchstickNumber(x) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(double actual, double expected){
      return (actual - expected).abs() < 1e-06;
  }
  
  String driver(x, double expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(x), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          6, 
          63.0)
      }");
  
      print("TEST-1...${driver(
          25, 
          975.0)
      }");
  
      print("TEST-2...${driver(
          15, 
          360.0)
      }");
  
      print("TEST-3...${driver(
          30, 
          1395.0)
      }");
  
      print("TEST-4...${driver(
          17, 
          459.0)
      }");
  
      print("TEST-5...${driver(
          80, 
          9720.0)
      }");
  
      print("TEST-6...${driver(
          27, 
          1134.0)
      }");
  
      print("TEST-7...${driver(
          13, 
          273.0)
      }");
  
      print("TEST-8...${driver(
          12, 
          234.0)
      }");
  
      print("TEST-9...${driver(
          67, 
          6834.0)
      }");
  
      return 0;
  }
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;
  }