title: Find Harmonic Mean Using Arithmetic Mean Geometric Mean
signature: fun findHarmonicMeanUsingArithmeticMeanGeometricMean(a: Int, b: Int): Double {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Double, expected:Double):Boolean{
    return abs(actual - expected) < 1e-09
  }
  fun driver(a: Int, b: Int, expected:Double):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(a, b), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(54, 83, 65.43065693430657)
      println("TEST-0...${result}")
      
      result = driver(42, 56, 48.0)
      println("TEST-1...${result}")
      
      result = driver(63, 12, 20.16)
      println("TEST-2...${result}")
      
      result = driver(19, 76, 30.4)
      println("TEST-3...${result}")
      
      result = driver(41, 50, 45.054945054945065)
      println("TEST-4...${result}")
      
      result = driver(7, 26, 11.030303030303031)
      println("TEST-5...${result}")
      
      result = driver(39, 42, 40.444444444444436)
      println("TEST-6...${result}")
      
      result = driver(11, 64, 18.773333333333333)
      println("TEST-7...${result}")
      
      result = driver(96, 81, 87.86440677966101)
      println("TEST-8...${result}")
      
      result = driver(15, 54, 23.47826086956522)
      println("TEST-9...${result}")
      
          
  }
  
  main()
source_py: def find_harmonic_mean_using_arithmetic_mean_geometric_mean(a, b):
      AM = ((a + b) / 2)
      GM = math.sqrt((a * b))
      HM = ((GM * GM) / AM)
      return HM
source_cpp: double find_harmonic_mean_using_arithmetic_mean_geometric_mean(int a, int b) {
    double AM, GM, HM;
    AM = ( a + b ) / 2;
    GM = sqrt ( a * b );
    HM = ( GM * GM ) / AM;
    return HM;
  }