title: Compute Average Two Numbers Without Overflow
signature: fun computeAverageTwoNumbersWithoutOverflow(a: Int, b: Int): Int {
source_py: def compute_average_two_numbers_without_overflow(a, b):
      return floor(((a + b) / 2))
source_cpp: int compute_average_two_numbers_without_overflow(int a, int b) {
    return ( a + b ) / 2;
  }
question_info.test_list: [{"idx": 0, "outputs": 22, "inputs": {"a": 1, "b": 44}}, {"idx": 1, "outputs": 33, "inputs": {"a": 6, "b": 61}}, {"idx": 2, "outputs": 47, "inputs": {"a": 75, "b": 20}}, {"idx": 3, "outputs": 34, "inputs": {"a": 51, "b": 17}}, {"idx": 4, "outputs": 22, "inputs": {"a": 19, "b": 25}}, {"idx": 5, "outputs": 90, "inputs": {"a": 82, "b": 98}}, {"idx": 6, "outputs": 46, "inputs": {"a": 72, "b": 21}}, {"idx": 7, "outputs": 44, "inputs": {"a": 48, "b": 41}}, {"idx": 8, "outputs": 14, "inputs": {"a": 12, "b": 17}}, {"idx": 9, "outputs": 60, "inputs": {"a": 41, "b": 80}}]
question_info.extension: kts
question_info.test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(a: Int, b: Int, expected:Int):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(1, 44, 22)
      println("TEST-0...${result}")
      
      result = driver(6, 61, 33)
      println("TEST-1...${result}")
      
      result = driver(75, 20, 47)
      println("TEST-2...${result}")
      
      result = driver(51, 17, 34)
      println("TEST-3...${result}")
      
      result = driver(19, 25, 22)
      println("TEST-4...${result}")
      
      result = driver(82, 98, 90)
      println("TEST-5...${result}")
      
      result = driver(72, 21, 46)
      println("TEST-6...${result}")
      
      result = driver(48, 41, 44)
      println("TEST-7...${result}")
      
      result = driver(12, 17, 14)
      println("TEST-8...${result}")
      
      result = driver(41, 80, 60)
      println("TEST-9...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: computeAverageTwoNumbersWithoutOverflow
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn