Thank you! Must be I was watching description too fast.
((P-1)! + 1) / (P * P) with P = 5 is ((5-1)! + 1) / (5 * 5) -> (24 + 1) / (5 * 5) = 1
((P-1)! + 1) / (P * P)
P = 5
((5-1)! + 1) / (5 * 5)
(24 + 1) / (5 * 5) = 1
expected: but was:
So, according to instructions:
(1 * 2 * 3 * 4 * 5 - 1)/(5*5) = (120 - 1)/ (25) = 119/25 = 4.76
4.76 is not whole number. Why test tells that result must be true?
! means factorial ::: 5! = 5'4'3'2'1
Please use new python test framework.
What would be ways to calculate the primes without the alloted time running out? I am using python and so far options with reduce(), factorial() and combining these with filtering out all the even numbers have not succeeded.
Though it is programming related, I assure you, I acknowledge your respectful point of view :P I can't give any spoilers anyway xd
Good luck on it!
This comment is hidden because it contains spoiler information about the solution
My first attempt was months ago, then I came back and understood what the Kata was about.
Serioulsy, it seems demotivating at first, but extremely fun and interesting once you get it :P!
I wish you good luck on it!
Are you being serious? Tough to tell with coders...
Whoever came up with this joke of a Kata needs to be flogged, demoted to 8 kyu, and then forced to clean the dojo for a month.
Quality kata which should be labeled Research 101 ;)