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
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s