7 kyu

Sum Factorial

1,835 of 3,338Alpri Else

Description:

Factorials are often used in probability and are used as an introductory problem for looping constructs. In this kata you will be summing together multiple factorials.

Here are a few examples of factorials:

4 Factorial = 4! = 4 * 3 * 2 * 1 = 24

6 Factorial = 6! = 6 * 5 * 4 * 3 * 2 * 1 = 720

In this kata you will be given a list of values that you must first find the factorial, and then return their sum.

For example if you are passed the list [4, 6] the equivalent mathematical expression would be 4! + 6! which would equal 744.

Good Luck!

Note: Assume that all values in the list are positive integer values > 0 and each value in the list is unique.

Also, you must write your own implementation of factorial, as you cannot use the built-in math.factorial() method.

Algorithms

More By Author:

Check out these other kata created by Alpri Else

Stats:

CreatedFeb 2, 2016
PublishedFeb 3, 2016
Warriors Trained4929
Total Skips44
Total Code Submissions7645
Total Times Completed3338
Python Completions1835
C++ Completions424
Ruby Completions139
Haskell Completions64
C Completions106
JavaScript Completions888
Total Stars27
% of votes with a positive feedback rating92% of 524
Total "Very Satisfied" Votes454
Total "Somewhat Satisfied" Votes57
Total "Not Satisfied" Votes13
Ad
Contributors
  • Alpri Else Avatar
  • anter69 Avatar
  • smile67 Avatar
  • JohanWiltink Avatar
  • Blind4Basics Avatar
  • Voile Avatar
  • rowcased Avatar
  • FArekkusu Avatar
  • mouloud Avatar
  • Kacarott Avatar
  • XoRMiAS Avatar
  • 4500zenja1 Avatar
Ad