title: Smallest Of Three Integers Without Comparison Operators
signature: func smallestOfThreeIntegersWithoutComparisonOperators(x int, y int, z 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(x int, y int, z int, expected int) string {
      if validateSolution(PLACEHOLDER_FN_NAME(x, y, z),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(23, 
  	98, 
  	25, 23)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(87, 
  	55, 
  	94, 55)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(35, 
  	90, 
  	29, 29)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(25, 
  	9, 
  	41, 9)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(93, 
  	22, 
  	39, 22)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(52, 
  	42, 
  	96, 42)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(95, 
  	88, 
  	26, 26)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(91, 
  	64, 
  	51, 51)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(75, 
  	1, 
  	6, 1)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(96, 
  	44, 
  	76, 44)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
source_py: def smallest_of_three_integers_without_comparison_operators(x, y, z):
      c = 0
      while (x and y and z):
          x = (x - 1)
          y = (y - 1)
          z = (z - 1)
          c = (c + 1)
      return c
source_cpp: int smallest_of_three_integers_without_comparison_operators(int x, int y, int z) {
    int c = 0;
    while ( x && y && z ) {
      x --;
      y --;
      z --;
      c ++;
    }
    return c;
  }