#include<stdio.h>
#include<string.h>
#include<stdint.h>
int main() {
char binario[64];
binario[63] = '\0';
int64_t decimal;
int position = 62, count = 0;
while (decimal > 0) {
int bit = decimal & 1;
binario[position--] = '0' + bit;
count += bit;
decimal /= 2;
}
printf("%s - quantidade de '1' => %d", &binario
[position
+ 1], count
); }
I2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8c3RyaW5nLmg+CiNpbmNsdWRlPHN0ZGludC5oPgoKaW50IG1haW4oKSB7CiAgICBjaGFyIGJpbmFyaW9bNjRdOwogICAgbWVtc2V0KGJpbmFyaW8sICcwJywgNjMpOwogICAgYmluYXJpb1s2M10gPSAnXDAnOwogICAgaW50NjRfdCBkZWNpbWFsOwogICAgc2NhbmYoIiVqZCIsICZkZWNpbWFsKTsKICAgIGludCBwb3NpdGlvbiA9IDYyLCBjb3VudCA9IDA7CiAgICB3aGlsZSAoZGVjaW1hbCA+IDApIHsKICAgICAgICBpbnQgYml0ID0gZGVjaW1hbCAmIDE7CiAgICAgICAgYmluYXJpb1twb3NpdGlvbi0tXSA9ICcwJyArIGJpdDsKICAgICAgICBjb3VudCArPSBiaXQ7CiAgICAgICAgZGVjaW1hbCAvPSAyOwogICAgfQogICAgcHJpbnRmKCIlcyAtIHF1YW50aWRhZGUgZGUgJzEnID0+ICVkIiwgJmJpbmFyaW9bcG9zaXRpb24gKyAxXSwgY291bnQpOwp9