title: Compute Average Two Numbers Without Overflow 1
signature: fun computeAverageTwoNumbersWithoutOverflow1(a: Int, b: Int): Int {
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(9, 81, 45)
      println("TEST-0...${result}")
      
      result = driver(68, 79, 73)
      println("TEST-1...${result}")
      
      result = driver(51, 2, 26)
      println("TEST-2...${result}")
      
      result = driver(31, 49, 40)
      println("TEST-3...${result}")
      
      result = driver(14, 10, 12)
      println("TEST-4...${result}")
      
      result = driver(73, 9, 41)
      println("TEST-5...${result}")
      
      result = driver(51, 13, 32)
      println("TEST-6...${result}")
      
      result = driver(75, 67, 71)
      println("TEST-7...${result}")
      
      result = driver(98, 51, 74)
      println("TEST-8...${result}")
      
      result = driver(83, 74, 78)
      println("TEST-9...${result}")
      
          
  }
  
  main()
source_py: def compute_average_two_numbers_without_overflow_1(a, b):
      return (((a // 2) + (b // 2)) + (((a % 2) + (b % 2)) // 2))
source_cpp: int compute_average_two_numbers_without_overflow_1(int a, int b) {
    return ( a / 2 ) + ( b / 2 ) + ( ( a % 2 + b % 2 ) / 2 );
  }