# include <stdio.h> int main() { int number; while (scanf("%d", &number) != EOF) { int count = 0; for (int i = 0; i < 31; i++) { if ((number & 1) == 1) count++; number >>= 1; } printf("%d\n", count); } }</stdio.h>
点赞

相关推荐

牛客网
牛客企业服务