factorials

Computer Science Level pending

What is the smallest number N, such that the sum of the digits in N! is 8001. for example, the sum of the digits in 6! is 9, because 1 2 3 4 5*6 is 720.


The answer is 787.

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.

1 solution

Thaddeus Abiy
Feb 5, 2014

Slow,Ugly,Obfuscated python code

from math import factorial as f
print min(filter(lambda x:sum(map(int,str(f(x))))==8001,range(1000)))

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...