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))));
    }
    
}
我的做法是不是太lowB了