num. Write num, then 2 * num, then 3 * num one after another with no separators, forming a single string of digits.
Return True if every digit from 1 to 9 appears in that string exactly once and there is no zero at all. Otherwise return False.
For instance, num = 219 produces 219438657, which qualifies.num=273 → True
Gluing 273, 546 and 819 gives 273546819: each digit from 1 to 9 exactly once.
num=250 → False
The result is 250500750, which has zeros and repeats.
num=111 → False
111222333 uses only three distinct digits.
num=273
True
Run checks the first 3 tests in your browser. Submit checks all 63 tests on the server, hidden ones included.