diff options
Diffstat (limited to 'progs/a587.py')
-rw-r--r-- | progs/a587.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/progs/a587.py b/progs/a587.py new file mode 100644 index 0000000..090067e --- /dev/null +++ b/progs/a587.py @@ -0,0 +1,6 @@ +def count_Set_Bits(n):
+ count = 0
+ while (n):
+ count += n & 1
+ n >>= 1
+ return count
\ No newline at end of file |