📅  最后修改于: 2022-03-11 15:04:31.695000             🧑  作者: Mango
// day 10 binary numbers hackerrank solution javascript
function main() {
const n = parseInt(readLine().trim(), 10);
const arr = n.toString(2).split("0");
const arrlengths = arr.map(x => x.length);
const maxLength = Math.max(...arrlengths);
console.log(maxLength);
}