Given 2 non-negative integers as input, output a non-negative integer that cannot be created through any mathematical operators on the 2 inputs.
For example, given inputs 2
and 3
, 6, 0, 5, 1, 9, 8, 23, 2
are all invalid outputs.
Operations that must be taken into account are:
Addition (a + b)
Subtraction (a - b) and (b - a)
Multiplication (a * b)
Division (a / b) and (b / a)
Modulus (a % b) and (b % a)
Exponentiation (a ** b) and (b ** a)
Bitwise OR (a | b)
Bitwise XOR (a ^ b)
Bitwise AND (a & b)
Concatenation (a.toString() + b.toString()) and (b.toString() + a.toString())
In cases where an operation would lead to a non-integer (such as 2 / 3), always floor. So 2 / 3 = 0
Assume any invalid operations (such as dividing by 0) result in 0.
Input
2 non-negative integers.
Standard I/O methods are accepted
You can assume the input will always be within a handleable range for your given language, however remember standard loopholes still apply.
Output
Any non-negative integer that can not be created via any of the above operations on the 2 inputs.
Testcases
Input -> Invalid outputs
2, 3 -> 0, 1, 2, 3, 5, 6, 8, 9, 23, 32
0, 0 -> 0
17, 46 -> 0, 2, 12, 17, 29, 63, 782, 1746, 4617, 18487710785295216663082172416, 398703807810572411498315063055075847178723756123452198369
6, 6 -> 0, 1, 6, 12, 36, 66, 46656
1, 1 -> 0, 1, 2, 11
Scoring
This is code-golf so fewest bytes wins!