SOURCE

function solution(n){
    let dp = [1, 1, 1, 1]
    for(let i= 4; i<n; i++){
        dp[i] = dp[i-4]+dp[i-1]
    }
    return dp[n-1]
}

console.log(solution(87))
console 命令行工具 X clear

                    
>
console