title: Area Of A Hexagon
signature: double areaOfAHexagon(double s) {
test_code: #include <algorithm>
  #include <assert.h>
  #include <cstdlib>
  #include <iostream>
  #include <map>
  #include <set>
  #include <string>
  #include <tuple> 
  #include <unordered_map>
  #include <vector>
  #include <math.h>
  #include <cmath>
  #include <bits/stdc++.h>
  #include <numeric>
  #include <functional>
  
  using namespace std;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(double actual, double expected){
      return abs(actual - expected) < 1e-09;
  }
  
  string driver(double s, double expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(s), expected)){
              return "PASSED";
          }
          return "FAILED";
      }
      catch (const std::overflow_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::runtime_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::exception& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (...)
      {
          return "UNK_ERROR";
      }
  }
  
  int main() {
      string result = "";
  
      result = driver(1772.6589509256596, 8163986.207300422); 
      cout << "TEST-" << 0 << "..."
           <<  result
           << "\n";
  
      result = driver(-599.737107809315, 934487.9989101035); 
      cout << "TEST-" << 1 << "..."
           <<  result
           << "\n";
  
      result = driver(1074.1765931782, 2997804.1448343466); 
      cout << "TEST-" << 2 << "..."
           <<  result
           << "\n";
  
      result = driver(-1182.4087746714795, 3632345.696441302); 
      cout << "TEST-" << 3 << "..."
           <<  result
           << "\n";
  
      result = driver(8083.035797247716, 169746524.38794258); 
      cout << "TEST-" << 4 << "..."
           <<  result
           << "\n";
  
      result = driver(-6126.414356565494, 97513471.98905805); 
      cout << "TEST-" << 5 << "..."
           <<  result
           << "\n";
  
      result = driver(5370.057504189614, 74922068.46663411); 
      cout << "TEST-" << 6 << "..."
           <<  result
           << "\n";
  
      result = driver(-6947.020794285176, 125386010.4299519); 
      cout << "TEST-" << 7 << "..."
           <<  result
           << "\n";
  
      result = driver(2110.5107873533325, 11572495.990484647); 
      cout << "TEST-" << 8 << "..."
           <<  result
           << "\n";
  
      result = driver(-6458.751326919488, 108379966.88267714); 
      cout << "TEST-" << 9 << "..."
           <<  result
           << "\n";
  
      return 0;
  }
source_py: def area_of_a_hexagon(s):
      return (((3 * math.sqrt(3)) * (s * s)) / 2)
source_cpp: double area_of_a_hexagon(double s) {
    return ( ( 3 * sqrt ( 3 ) * ( s * s ) ) / 2 );
  }