javascript 牛客变风格了啊
let N = readline() let coinCount = 0 let sum = 1024 - N; while(sum > 0){ if(sum >= 64){ coinCount++ sum -= 64 }else if( sum >=16 && sum < 64){ coinCount++ sum -= 16 }else if(sum >= 4 && sum < 16){ coinCount++ sum -= 4 } else { coinCount++ sum -= 1 } } console.log(coinCount)