title: Program Area Square
signature: function programAreaSquare(side: number): number {
source_py: def program_area_square(side):
      area = (side * side)
      return area
source_cpp: int program_area_square(int side) {
    int area = side * side;
    return area;
  }
question_info.test_list: [{"idx": 0, "outputs": 2500, "inputs": {"side": 50}}, {"idx": 1, "outputs": 4096, "inputs": {"side": 64}}, {"idx": 2, "outputs": 8464, "inputs": {"side": 92}}, {"idx": 3, "outputs": 529, "inputs": {"side": 23}}, {"idx": 4, "outputs": 1444, "inputs": {"side": 38}}, {"idx": 5, "outputs": 3025, "inputs": {"side": 55}}, {"idx": 6, "outputs": 4489, "inputs": {"side": 67}}, {"idx": 7, "outputs": 3136, "inputs": {"side": 56}}, {"idx": 8, "outputs": 3600, "inputs": {"side": 60}}, {"idx": 9, "outputs": 8100, "inputs": {"side": 90}}]
question_info.entry_cls_name: Solution
question_info.test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: number, expected: number): boolean {
      return convertToString(actual) === convertToString(expected);
  }
  
  function driver(side: number, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(side),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(50, 2500);
    console.log(`TEST-0...${result}`);
  
    result = driver(64, 4096);
    console.log(`TEST-1...${result}`);
  
    result = driver(92, 8464);
    console.log(`TEST-2...${result}`);
  
    result = driver(23, 529);
    console.log(`TEST-3...${result}`);
  
    result = driver(38, 1444);
    console.log(`TEST-4...${result}`);
  
    result = driver(55, 3025);
    console.log(`TEST-5...${result}`);
  
    result = driver(67, 4489);
    console.log(`TEST-6...${result}`);
  
    result = driver(56, 3136);
    console.log(`TEST-7...${result}`);
  
    result = driver(60, 3600);
    console.log(`TEST-8...${result}`);
  
    result = driver(90, 8100);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: programAreaSquare
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js