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.
I think it relies on https://www.mathsisfun.com/money/compound-interest.html
I first tried this solution, but couldn't get my head around on how to add aug to the formula.
Pretty clever solution, though.
This comment is hidden because it contains spoiler information about the solution
Does not work for simple test
This comment is hidden because it contains spoiler information about the solution
Sorry,I can't understand.
Yeah, I don't know I would trust this, between the magic number 150, and the attempt to jump direct to the solution with a log.
Pretty cool !
But i really do not understand the math behind this...
Plz explain.
Are you the only one who goes againt the result of 6156 guys? I can only repeat what I said: your method is wrong.
I agree with
2 + 2 = 4
because the calculation is correct but that doesn't mean that it is a good result for a test of the kata.I don't want to be rude (and if you think that I am, I will be very sorry).
If you want you could unlock the JS solution and look at right solutions.
Cheers!
I have made the solution which pass all tests except this one, because this one is incorrect!
If you agree with my calculation, how can you deny that the test is invalid?
Link above proves that 150 is correct answer for given set of input data (1500000, 0.25, -1000, 2000000), isn't it?
p.s. We can discuss this in private messages if you are worried about spoilers :)
Yes your calculation is certainly correct but it is not the good way to get the result... I can't give the solution:-)
I'm sorry, but can you explan me the fact, that even wolframalpha considers just as I, just check it:
https://www.wolframalpha.com/input/?i=((1.0025)%5E150)*1500000+%2B+(-1000*150)
The result is stiil greather than 2000000 :)
I am very sorry, look at the top of the page: 1754 guys passed the JS kata, 6145 with all languages. The tests are the same in all the 13 languages. For all these reasons there can't be any error in the tests. Don't forget that decimal part of a population don't have babies:-)
One of basis tests:
Test.assertEquals(nbYear(1500000, 0.25, -1000, 2000000), 151);
But it should be:
Test.assertEquals(nbYear(1500000, 0.25, -1000, 2000000), 150);
just check out this js expression: