#B2152. Extract Digits from an Integer

    ID: 11234 Type: Default 1000ms 256MiB

Extract Digits from an Integer

Extract Digits from an Integer

Given an integer \(n\), extract each digit starting from the units digit. That is, separate out the digits of \(n\) from the least significant digit (units) to the most significant digit. Output each digit on a new line.

inputFormat

The input consists of a single integer \(n\). Note that if \(n = 0\), the output should still contain a single digit: 0.

outputFormat

Output the digits of \(n\) starting from its units digit, with each digit printed on a separate line.

sample

12345
5

4 3 2 1

</p>