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)
note: apologies if your name is coincidentally ben zhang
Quote: "Let N be a positive integer consisting of the digits dn...d1 d0...prints its digits in a column, starting with d0. "
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)
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.