23dfcca431 2011-02-23 kinaba: int bitcnt(LL x) 23dfcca431 2011-02-23 kinaba: { 23dfcca431 2011-02-23 kinaba: int c = 0; 23dfcca431 2011-02-23 kinaba: for(; x; x>>=1) 23dfcca431 2011-02-23 kinaba: c += x&1; 23dfcca431 2011-02-23 kinaba: return c; 23dfcca431 2011-02-23 kinaba: }