#13 - #19を教えて!gooで解答せよ。
https://oshiete.goo.ne.jp/articles/qa/2834
https://web.archive.org/web/20220923175516/https://oshiete.goo.ne.jp/articles/qa/2834
https://projecteuler.net/problem=20
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!
結論からお伝えすると、答えを教えてください。C,C++,javaのどれかで。
コードと入力と出力とできれば解説もお願いします。
プログラミング未経験でも簡単に理解できるように説明してほしい。
私の考え
オーバーフローが発生する。
回答3件
あなたの回答
tips
プレビュー