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'm trying to solve this problem https://www.codewars.com/kata/563b662a59afc2b5120000c6/train/php
in php and I arrived at a solution that passes the tests but at the time of sending it as an answer it does not accept:
function nbYear($p0, $percent, $aug, $p) {
$year = 0;
do{
$upYear = ($p0 * ($percent/100)) + $aug;
$p0 = $p0 + $upYear;
$year++;
}
while($p0 <= $p);
return $year;
}
I do not understand