Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #python
- import sys
- import os
- #this function is what need modified
- def CountBits( n):
- #count = 0;
- #while(n):
- #n &= n - 1
- #count += 1
- #return(count)
- f = open(os.environ['OUTPUT_PATH'], 'w')
- num = int(raw_input());
- binary = CountBits(num);
- for dis_bin in binary:
- f.write( str(dis_bin) + "n" )
- f.close()
Advertisement
Add Comment
Please, Sign In to add comment