ACM (UVa) : 324
Factorial Frequencies
Data type:
Integer/ Long Integer
Algorithm:
Follow the algorithm, named “Big Integer in Array” under the Common Categories.
Recommendation:
Output format should be follow carefully.
100! -- (0) 30 (1) 15 (2) 19 (3) 10 (4) 10 (5) 14 (6) 19 (7) 7 (8) 14 (9) 20 Look at the second line, it is right justified. Critical Input: 366 300 259 0 Critical Output: 366! -- (0) 160 (1) 93 (2) 58 (3) 60 (4) 74 (5) 81 (6) 58 (7) 64 (8) 59 (9) 74 300! -- (0) 121 (1) 42 (2) 66 (3) 54 (4) 53 (5) 59 (6) 66 (7) 54 (8) 51 (9) 49 259! -- (0) 103 (1) 65 (2) 45 (3) 45 (4) 43 (5) 37 (6) 44 (7) 46 (8) 45 (9) 42