题解 | #二进制转换#
二进制转换
https://www.nowcoder.com/practice/7b74386695cc48349af37196f45e62a8
function convertToBinary(num) {
return '0'.repeat(8-num.toString(2).length)+num.toString(2);
}
二进制转换
https://www.nowcoder.com/practice/7b74386695cc48349af37196f45e62a8
function convertToBinary(num) {
return '0'.repeat(8-num.toString(2).length)+num.toString(2);
}
相关推荐