title: Number Ways Node Make Loop Size K Undirected Complete Connected Graph N Nodes
signature: numberWaysNodeMakeLoopSizeKUndirectedCompleteConnectedGraphNNodes :: Integer -> Integer -> Double
  numberWaysNodeMakeLoopSizeKUndirectedCompleteConnectedGraphNNodes n k = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Double -> Double -> Bool
  validateSolution actual expected = do
      (abs (actual-expected)) < 1e-06
  
  driver :: Integer -> Integer -> Double -> String
  driver n k expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME n k) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (16) (2) (15.0) )
  
source_py: def number_ways_node_make_loop_size_k_undirected_complete_connected_graph_n_nodes(n, k):
      p = 1
      if (k % 2):
          p = (- 1)
      return ((pow((n - 1), k) + (p * (n - 1))) / n)
source_cpp: int number_ways_node_make_loop_size_k_undirected_complete_connected_graph_n_nodes(int n, int k) {
    int p = 1;
    if ( k % 2 ) p = - 1;
    return ( pow ( n - 1, k ) + p * ( n - 1 ) ) / n;
  }