pyth


SUBMITTED BY: frozenbits

DATE: Feb. 9, 2016, 9:49 p.m.

FORMAT: Text only

SIZE: 132 Bytes

HITS: 5035

  1. i=input
  2. t=int
  3. n=t(i())
  4. for r in range(n):
  5. c=0
  6. x=t(i())
  7. while x>0:
  8. c+=x%2
  9. x>>=1
  10. print(c)

comments powered by Disqus