Explanation:
the output of your code is 30
<span>The answer is Ten. Substituting numbers for letters, available selections are 111, 112, 113, 122, 123, 133, 222, 223, 233, 333. Note that, for example, 112, 121, and 211 are considered as the same selection.
</span>AAA, BBB, CCC, <span>AAB, AAC, </span><span>BBC, </span><span>ABB, ACC, </span><span>CCB & ABC.</span>