#include<stdio.h> int main(){ int reg,count=0,pos=0 ; scanf("%d",®); while(pos<32){ if (reg &(1<<pos)) { count++; } pos++; } printf("%d",count); return 0; }
Test Cases
Test Results
Input
0
Expected Output