Input
A string that contains at most one of each of the letters A
, B
, and C
. They may be in any order. The empty string is valid input.
Note: A previous version of this challenge used the letters LEJ
instead of ABC
and they may still be used if desired.
Output
A string of the A
, B
, C
letters that were not present in the input. They may be in any order.
If the output would be the empty string then simply giving no output is valid, if that makes sense for your implementation. (e.g. you don't need to actually call print
on an empty string.)
Examples
- If the input is
B
then the output should either beCA
orAC
sinceA
andC
are not present in the input. - If the input is the empty string then the output should be
ABC
or any permutation since none of the three letters are present in the input. - If the input is
CAB
then the output should be the empty string because all three letters are present in the input.
Test Cases
There are so few input cases that we can enumerate all of them:
in -> out1 | out2 | out3 | ...
ABC -> ""
ACB -> ""
BCA -> ""
BAC -> ""
CAB -> ""
CBA -> ""
AB -> C
AC -> B
BC -> A
BA -> C
CA -> B
CB -> A
A -> BC | CB
B -> CA | AC
C -> AB | BA
"" -> ABC | ACB | BCA | BAC | CAB | CBA
All valid outputs for each input are given, separated by |
's. ""
represents the empty string
Scoring
The shortest code in bytes wins. But keep in mind that you may get more recognition for solving the challenge in a unique way rather than in a short way ;)