Bluebook

Column of Numbers

Let N be a positive integer consisting of the digits dn...d1d0. Write a program that reads a value of N and then prints its digits in a column, starting with d0.
Note: The number can and will be very very large.

Sample Input

3467

Sample Output

7
6
4
3

All Submissions
Best Solutions


Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 22, 2008

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

What's wrong with my submission? I only get 10/30.

Try this test case:
Input:
0000000
Output should be:
0
0
0
0
0
0
0
Also, long long isn't long enough, refer to the comment below by Butane. He says "do not think of the digits as numbers, but rather as characters of a string." (keyword is string)

Is there supposed to be output for 0?

Yes, there is supposed to be an output for 0, even if the 0 adds no value to the number.

*sigh* sorry I'm still not entirely sure I understand, what is supposed to be output for 0?

Just output a 0 for every 0 in the input...

If the number is 0000: then you have to print 0000
if the number is 0001: then you have to print 1000
In this problem, do not think of the digits as numbers, but rather as characters of a string. You are simply reversing the string, and printing each letter on its own.