title: Smallest Of Three Integers Without Comparison Operators 1
signature: func smallestOfThreeIntegersWithoutComparisonOperators1(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(48, 
  	63, 
  	56, 56)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(11, 
  	55, 
  	84, 84)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(50, 
  	89, 
  	96, 96)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(21, 
  	71, 
  	74, 74)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(94, 
  	39, 
  	42, 42)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(22, 
  	44, 
  	86, 86)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(3, 
  	41, 
  	68, 68)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(67, 
  	62, 
  	94, 94)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(59, 
  	2, 
  	83, 83)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(50, 
  	11, 
  	1, 1)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
source_py: def smallest_of_three_integers_without_comparison_operators_1(x, y, z):
      if (not (y / x)):
          return (y if (not (y / z)) else z)
      return (x if (not (x / z)) else z)
source_cpp: int smallest_of_three_integers_without_comparison_operators_1(int x, int y, int z) {
    if ( ! ( y / x ) ) return ( ! ( y / z ) ) ? y : z;
    return ( ! ( x / z ) ) ? x : z;
  }