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.
love the last comment
It is indeed somewhat inefficient and potentially return an error, given p0 = 100, percent = 2, aug = 10, p = 100 (I know, evil)
it would return 1 year, while the correct answer would be 0.
To solve it, initialize years = 0, get rid of the initial pCalc (that already assumes it year 1), and place it all inside the loop :)
why do you feel its inefficient?
Thx g964, this was the missing piece of info for me. Next time I'll start with reading the discussions tab.
The tests are the same in all languages. 1840 guys passed the kata (236 in C#). I am afraid you didn't read the description.
As another guy said below (you could have read that):
Good luck and happy coding!
This kata is (at least in c#) useless. The random untittests are not consistent in their expectations. For example, given these lists (only string length shown), it expects to 7 as the answer while 11-2=9 is the max lenght difference. Anyone can explain the purpose?
a1: 2, 4, 5, 7, 7, 9, 11
a2: 6, 8, 8, 9, 9