Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
to truncate to 6 decimal places
This comment is hidden because it contains spoiler information about the solution
can one explain how the main formula (1 / n!) * (1! + 2! + 3! + ... + n!) been simplified to the above solution (in a simple for loop). Also please recommend me where I can learn the tricks to simply maths to code in efficient way.
Maybe because it's truncating, not rounding?
Is there any reason not to use
round
here? Does this method have more efficiency here?This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution