Input two positive integers, X and Y. The task is to translate the decimal number X into Y digits ternary (三進位) number, and output the Y digits ternary number.
X is smaller than 1000 and Y is smaller than 8.
Two positive integers, X and Y. X is smaller than 1000 and Y is smaller than 8.
The Y digits ternary representation of the input number X.
Note that you need to print a '\n' at the end of the bit string.