PE #20


To Each His Own Array

Intro and Problem Statement

Hello again everybody, this is the second follow up to my post about my Arbitrary Precision Calculator, PowArray. In this post I will be revealing and discussing my solution to Project Euler problem #20 (the basis for my Factorial calculator in PowArray).

Problem #20 states the following:

Factorial digit sum

n! means n (n − 1) … 3 2 1

For example, 10! = 10 × 9 × … 3 2 1 = 3628800,
and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27.

Find the sum of the digits in the number 100!

A Foreword

I’ll limit the number of words in this post in favor of code, as the ideas are pretty similar and not worth reiterating verbatim.

Before jumping right into the solution, it is important to…

View original post 354 more words

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