title: Probability Three Randomly Chosen Numbers Ap
signature: probabilityThreeRandomlyChosenNumbersAp(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(double actual, double expected){
      return (actual - expected).abs() < 1e-09;
  }
  
  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(
          46, 
          0.0163062743707905)
      }");
  
      print("TEST-1...${driver(
          5, 
          0.15151515151515152)
      }");
  
      print("TEST-2...${driver(
          44, 
          0.017047655947307245)
      }");
  
      print("TEST-3...${driver(
          15, 
          0.05005561735261402)
      }");
  
      print("TEST-4...${driver(
          72, 
          0.010417169037858692)
      }");
  
      print("TEST-5...${driver(
          2, 
          0.4)
      }");
  
      print("TEST-6...${driver(
          86, 
          0.008721225027887637)
      }");
  
      print("TEST-7...${driver(
          17, 
          0.04415584415584416)
      }");
  
      print("TEST-8...${driver(
          30, 
          0.025006946373992776)
      }");
  
      print("TEST-9...${driver(
          42, 
          0.01785967399007796)
      }");
  
      return 0;
  }
source_py: def probability_three_randomly_chosen_numbers_ap(n):
      return ((3.0 * n) / ((4.0 * (n * n)) - 1))
source_cpp: double probability_three_randomly_chosen_numbers_ap(int n) {
    return ( 3.0 * n ) / ( 4.0 * ( n * n ) - 1 );
  }