Read topic
see what does this prob require:
For each integer input, the program should print exactly one line of output. Each line of output should contain the value N, right-justified in columns 1 through 5 with leading blanks, not leading zeroes. Columns 6 - 9 must contain " -> " (space hyphen greater space). Column 10 must contain the single last non-zero digit of N!
Isn't it stupid?
Well, this problem is obviously stolen from USACO.
Re:Isn't it stupid?
2009-08-06 06:03:42 Chenjiecao
well,Here is a demo of CPP
....
#include<iomanip>
.....
cout << setw(5) << n << " -> " << ans << endl;
?
2009-09-03 17:06:43 zhou
Sample Output
1 -> 1
2 -> 2
26 -> 4
125 -> 8
3125 -> 2
9999 -> 8
26 -> 4 ????????????
Reply
|