function countNumber( $number) {
$sum = 0;
while ($number!=0){
if($number%2 != 0 ){
$sum++;
}
$number = $number/2;
}
return $sum;
}
原文地址:https://www.cnblogs.com/farmerworker/p/9612516.html
时间: 2024-10-29 03:02:55
function countNumber( $number) {
$sum = 0;
while ($number!=0){
if($number%2 != 0 ){
$sum++;
}
$number = $number/2;
}
return $sum;
}
原文地址:https://www.cnblogs.com/farmerworker/p/9612516.html