title: Hexagonal Number
signature: hexagonalNumber(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(n, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          38, 
          2850)
      }");
  
      print("TEST-1...${driver(
          44, 
          3828)
      }");
  
      print("TEST-2...${driver(
          58, 
          6670)
      }");
  
      print("TEST-3...${driver(
          10, 
          190)
      }");
  
      print("TEST-4...${driver(
          31, 
          1891)
      }");
  
      print("TEST-5...${driver(
          53, 
          5565)
      }");
  
      print("TEST-6...${driver(
          94, 
          17578)
      }");
  
      print("TEST-7...${driver(
          64, 
          8128)
      }");
  
      print("TEST-8...${driver(
          71, 
          10011)
      }");
  
      print("TEST-9...${driver(
          59, 
          6903)
      }");
  
      return 0;
  }
source_py: def hexagonal_number(n):
      return (n * ((2 * n) - 1))
source_cpp: int hexagonal_number(int n) {
    return n * ( 2 * n - 1 );
  }