title: Nth Pentagonal Number
signature: nthPentagonalNumber(n) {
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(n, double 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(
          96, 
          13776.0)
      }");
  
      print("TEST-1...${driver(
          93, 
          12927.0)
      }");
  
      print("TEST-2...${driver(
          15, 
          330.0)
      }");
  
      print("TEST-3...${driver(
          8, 
          92.0)
      }");
  
      print("TEST-4...${driver(
          21, 
          651.0)
      }");
  
      print("TEST-5...${driver(
          14, 
          287.0)
      }");
  
      print("TEST-6...${driver(
          11, 
          176.0)
      }");
  
      print("TEST-7...${driver(
          79, 
          9322.0)
      }");
  
      print("TEST-8...${driver(
          24, 
          852.0)
      }");
  
      print("TEST-9...${driver(
          94, 
          13207.0)
      }");
  
      return 0;
  }
source_py: def nth_pentagonal_number(n):
      return ((((3 * n) * n) - n) / 2)
source_cpp: int nth_pentagonal_number(int n) {
    return ( 3 * n * n - n ) / 2;
  }