Bash + GNU utilities, 26
sort|uniq -u|dc -e1?*?*?*p
The 3 input integers are each given on their own line.
In the case of non-distinct inputs, dcdc
warnings are printed to stderr. These may be ignored.
uniq -u
does most of the heavy lifting here. With the -u
option, only non-duplicated lines are returned. uniq requires its input to be sort
ed.
The dc
expression pushes 1 to the stack, then reads up to 3 integers, multiplying each in turn, then p
rinting the output. If uniq pipes less than 3 integers to dc, then the surplus ?
will not add to the stack and the following *
will spit out a warning because * needs to pop 2 operands from the stack. But these are just warnings, dc continues execution until it prints the final product.