Ad
  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    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:

    1500000*Math.pow(1.0025, 150) + (-1000*150) > 2000000; // => true