Issue with your code, Try using a more efficient algorithm, read this before raising issues next time ~~
done it by testing.
but still time out problem for taking points !
Number of tests are scaled as per the total time (runtime + compilation time) of languages hence the required time complexity is roughly same across all languages.
and I've done this in python.
The author should have knowon that Python is slow and not capable of doing all of this under 12000 ms
instead of putting unnecessary tests that are impossible to do under 12000 ms
My code is just 2 lines (could have been 1 but this is for better excution time) and it still gives
me an Execution Timed Out (12000 ms) Error.
Execution Timed Out (12000 ms)
I'm not using for loop, or while loop, or anything that could be
possibly slowing down the program, I am just using math library (which is pure C) with len, strip functions
(which are pure C too)
That's not a programming task, but a maths task. Downvoted.
P.S. It was useful for me tho since I missed the hint at first therefore learned new things about the language. Thanks my unattentiveness for that. :)
Time: 1741ms Passed: 207 Failed: 1 Exit Code: 1
245388242 should equal 245388239
Any hint for me?! So I passed 207 but cannot figure out where the mistake is for large numbers.
You should not calculate the factorial
thank you, I was very confused as to why this worked since I haven't programmed in anything other than Python3
May I ask? What does the 1 do in this case?
I see. Thanks v much!
Great kata. Thank you for fun that this kata gave us:)
This comment is hidden because it contains spoiler information about the solution
30! = 265252859812191058636308480000000 //only 7 trailing zeros
The keyword is trailing
The third test for python is wrong. It says:'Testing with n = 30: 9 should equal 7.'
However, there are 9 zeroes in 30!.
I got the solution, however, I do think they should do a better job of clarifing their basic tests.