title: Compute Average Two Numbers Without Overflow
signature: func computeAverageTwoNumbersWithoutOverflow(a int, b int) int {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual int, expected int) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(a int, b int, expected int) string {
      if validateSolution(PLACEHOLDER_FN_NAME(a, b),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(1, 
  	44, 22)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(6, 
  	61, 33)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(75, 
  	20, 47)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(51, 
  	17, 34)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(19, 
  	25, 22)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(82, 
  	98, 90)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(72, 
  	21, 46)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(48, 
  	41, 44)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(12, 
  	17, 14)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(41, 
  	80, 60)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
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;
  }