Find the last 9 digits in the number
Clarification : denotes the factorial notation.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Since we only need the last 9 digits, we can do all our math modulo 1 0 9 to avoid exceeding the 64-bit signed integer type. Alternatively, we can use a language with big numbers. A simple implementation in Ruby is shown below.