values. For every original number, write its digits in reverse order (leading zeros are dropped, so 300 becomes 3) and append the result to the end of the array. Only the original numbers are mirrored, not the appended ones.
Return how many distinct numbers the final array contains.values=[47, 74, 300, 5] → 5
The array gains 74, 47, 3 and 5. The result is [47, 74, 300, 5, 74, 47, 3, 5], with five distinct numbers: 3, 5, 47, 74, 300.
values=[121, 121] → 1
121 reads the same both ways, so only one distinct number remains.
len(values) ≤ 10⁵values[i] ≤ 10⁶values=[47, 74, 300, 5]
5
Run checks the first 3 tests in your browser. Submit checks all 99 tests on the server, hidden ones included.