title: Smallest Of Three Integers Without Comparison Operators
signature: function smallest_of_three_integers_without_comparison_operators(x, y, z)
test_code: 
  
  -- SOLUTION CODE
  -- ============================================
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  function isCorrect(actual, expected)
      if type(expected) ~= type(actual) then
          return false
      end
      
      if type(expected) == 'table' then
          for k,v_expected in pairs(expected) do
              
              if actual[k] == nil then
                  return false
              end
              local v_actual = actual[k]
              if not isCorrect(v_actual, v_expected) then
                  return false
              end
              actual[k]=nil
          end
      
          if next(actual) then 
              return false
          end
          return true
      else
          return actual == expected
      end
  end
  
  function validateSolution(actual, expected)
      return isCorrect(actual,expected)
  end
  
  function driver(x, y, z, expected)
      local exec_result;
      local status, error_msg = pcall(function () 
          exec_result=PLACEHOLDER_FN_NAME(x, y, z) 
      end)
      if status then
          if validateSolution(exec_result,expected) then
              return "PASSED"
          end
          return "FAILED"
      else
          return string.format("ERROR=%s",string.gsub(error_msg,".*:[%d]+: ",""))
      end
  end
      
  function main()
      result = driver(23, 98, 25, 23)
      print(string.format("TEST-0...%s",result))
  
      result = driver(87, 55, 94, 55)
      print(string.format("TEST-1...%s",result))
  
      result = driver(35, 90, 29, 29)
      print(string.format("TEST-2...%s",result))
  
      result = driver(25, 9, 41, 9)
      print(string.format("TEST-3...%s",result))
  
      result = driver(93, 22, 39, 22)
      print(string.format("TEST-4...%s",result))
  
      result = driver(52, 42, 96, 42)
      print(string.format("TEST-5...%s",result))
  
      result = driver(95, 88, 26, 26)
      print(string.format("TEST-6...%s",result))
  
      result = driver(91, 64, 51, 51)
      print(string.format("TEST-7...%s",result))
  
      result = driver(75, 1, 6, 1)
      print(string.format("TEST-8...%s",result))
  
      result = driver(96, 44, 76, 44)
      print(string.format("TEST-9...%s",result))
  
  end
  
  main()
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;
  }