|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
题目20:算出100!的各位之和
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!
题目翻译:
n! = n × (n - 1) × ... × 3 × 2 × 1
例如, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800,
那么 10! 的各位之和就是 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27.
请算出 100! 的各位之和。
视频讲解:
https://www.bilibili.com/video/BV1iN4y197Fm/
思路解析及源码参考(C & Python):
|
|