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 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 :)
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 :)
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: