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)

does anyone know how to reverse a char array's order?

thats for you to figure out

Could someone please give me some help with my code? I've looked over it so many times, still not sure why it's giving me a runtime error. It's probably some dumb mistake I overlooked :/

impersonating an admin is a bannable offense


note: apologies if your name is coincidentally ben zhang

My bad, I had no idea there was an admin named Ben Zhang. Yes my real name is Ben Zhang, no apology needed :)

The runtime error that you encounter is shown in the details of your submission. There's only one place where it can possibly occur.

Haha, I guess it was a dumb mistake after all. Thanks for the help!

My submission works but only gets 10/30 on the judge.

Read the question
Quote: "Let N be a positive integer consisting of the digits dn...d1 d0...prints its digits in a column, starting with d0. "

I revised it to what the problem asks but now gets 0/30, this doesn't make sense.

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.