# 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>
点赞

相关推荐

牛客40297450...:不是研究生强,是你强
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务