title: Nth Pentagonal Number
signature: def nthPentagonalNumber(n: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Float , expected: Float): Boolean = {
      (actual - expected).abs < 1e-06F
  }
  
  def driver(n: Int, expected: Float): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        96, 
        13776.0F    
      )}")   
  
  
      println(s"TEST-1...${driver(
        93, 
        12927.0F    
      )}")   
  
  
      println(s"TEST-2...${driver(
        15, 
        330.0F    
      )}")   
  
  
      println(s"TEST-3...${driver(
        8, 
        92.0F    
      )}")   
  
  
      println(s"TEST-4...${driver(
        21, 
        651.0F    
      )}")   
  
  
      println(s"TEST-5...${driver(
        14, 
        287.0F    
      )}")   
  
  
      println(s"TEST-6...${driver(
        11, 
        176.0F    
      )}")   
  
  
      println(s"TEST-7...${driver(
        79, 
        9322.0F    
      )}")   
  
  
      println(s"TEST-8...${driver(
        24, 
        852.0F    
      )}")   
  
  
      println(s"TEST-9...${driver(
        94, 
        13207.0F    
      )}")   
  
  }
  
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;
  }