Types: inputs: List[int]
Ranges: 2 ≤ inputs[i] < 300000
Addtl Info: inputs end with a single digit 1 which is not processed