0
What's the bug? Tests are ok but still showing remove bugs
function main() { var depth = parseInt(readLine(), 10); //your code goes here var day = 0; while(1){ depth -= 7; day += 1; if(depth<=5){ day +=1; console.log(day); break; } depth +=2; } }
3 Respostas
0
Think ! Think you are close
But why you written while(1)
Put an expression
0
Not working
0
var day = 0;
var slipping = 0;
while(slipping<depth){
day = day + 1;
slipping = slipping + 7;
if(slipping >= depth){
console.log(day);
break;
}
slipping = slipping - 2;
}