Introduction - If you have any usage issues, please Google them yourself
input
The number of weights n (n>1) is first entered.
Then the N weights are entered in turn (the weight is a positive integer greater than 0).
output
Corresponding to the input n weight value, the corresponding encoding is output in turn.
At the time of coding, the left child branch code is 0 and the right child's branch code is 1