We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Project Euler #20: Factorial digit sum
Project Euler #20: Factorial digit sum
Sort by
recency
|
111 Discussions
|
Please Login in order to post a comment
Java
Almost a one-liner:
java
Python
//c # using System; using System; using System.Collections.Generic; using System.IO; class Solution { static void Main(String[] args) { var t = Convert.ToInt32(Console.ReadLine()); for(int i=0; i= 0; i--) sum+=number[i]; Console.WriteLine(sum); } static int Multiply(int times, int[] number,int numLength) { int carry = 0; for (int i = 0; i < numLength; i++) { int product = number[i] * times + carry; number[i] = product % 10; carry = product / 10; }
}