📌  相关文章
📜  Number Line Jumps hackerrank 解决方案 javascript 代码示例

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

代码示例1
//Number Line Jumps hackerrank solution javascript
function kangaroo(x1, v1, x2, v2) {
    // Write your code here
    for(let i = 1; i<=10000; i++){
        if(x1 + i * v1 === x2  + i *v2){
            return "YES";
        }
    }
    return "NO";
}