📌  相关文章
📜  电子商店hackerrank解决方案javascript代码示例

📅  最后修改于: 2022-03-11 15:02:10.936000             🧑  作者: Mango

代码示例1
// electronics shop hackerrank solution javascript
function getMoneySpent(keyboards, drives, b) {
    /*
     * Write your code here.
     */
    let sum = [];
    let max = 0;
    for(let i=0; i max){
                max = sum[k];
            }
        }
    }
    
    if(max !== 0 && max <=b){
        return max;
    }else{
        return -1;
    }
}