Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Digit sum of 100!

3 views
Skip to first unread message

Michael F. Stemper

unread,
Aug 21, 2022, 2:17:49 PM8/21/22
to
I've recently started working my way through Project Euler[1].
So far, I've had to think, but none of the problems have been
insurmountable.

In fact, I've just encountered the opposite with Problem 20[2].
This problem calls for finding the sum of the digits of 100!
(implicitly its decimal representation).

A python one-liner can calculate 100!, convert it to a string,
and sum the values of the characters in that string. Easy-peasy!

However, this is a brute-force approach, and I don't think that's
what this challenge is all about. Is there some fact about factorials
that I should be using? Can somebody give me a hint that will
seem blindingly obvious once I read it?

I absolutely do not want the answer, just a general pointer.

Thanks.

[1] <https://projecteuler.net/>
[2] <https://projecteuler.net/problem=20>
--
Michael F. Stemper
Always remember that you are unique. Just like everyone else.
0 new messages