• + 0 comments

    JS

    function main() {
        const n = parseInt(readLine().trim(), 10);
        const b = n.toString(2);
        const myArray = b.split('0').map((x) => x.length);
        console.log(Math.max(...myArray));
    }