网易前端最后一题我这么做是不是太猥琐了(AC)
function mostDays(x,f,d,p) {
if(Math.floor(d/x)<=f) {
return Math.floor(d/x);
} else {
return (f+(Math.floor((d-x*f)/(x+p))));
}
} #网易##前端工程师#
function mostDays(x,f,d,p) {
if(Math.floor(d/x)<=f) {
return Math.floor(d/x);
} else {
return (f+(Math.floor((d-x*f)/(x+p))));
}
} 相关推荐
招聘动态