function solution(progresses, speeds) {
let leftArray=[];
for (let i=0;i<progresses.length;i++){
leftArray.push(Math.ceil((100-progresses[i])/speeds[i]));
}
let max=leftArray[0];
let answer=[];
let count=1;
for (let i=1;i<=leftArray.length;i++){
if (max<leftArray[i]){
answer.push(count);
max=leftArray[i];
count=1;
}else if(i===leftArray.length){
answer.push(count);
break;
}else{
count+=1;
}
}
return answer;
}