Link to the original problem
It\'s not a homework question. I just thought that someone might know a real solution to this problem.
I was on
1 second? Why can't you just compute n! and add up the digits? That's 10000 multiplications and no more than a few ten thousand additions, which should take approximately one zillionth of a second.