coderforce 579A Raising Bacteria
2015-10-24 22:08
387 查看
题意:就是求一个数N可以分解成多少个2^a;
#include<stdio.h> #include<string.h> #include<algorithm> using namespace std; int main() { int n; while(scanf("%d",&n)!=EOF) { int cnt=0; while(n) { if(n&1) { cnt++; } n/=2; } printf("%d\n",cnt); } return 0; }
相关文章推荐
- Windows server 2012 R2 DHCP failover配置
- 2015 Fall HIT Weekly Training 2
- Coursera_Stanford_ML_ex6_支持向量机(SVM) 作业记录
- regular polygon can be drawn only by straightedge and compass
- POJ-1995 Raising Modulo Numbers
- AI顶级会议以及期刊
- container_of()宏
- _pActualRawDllMain cannot be in a R/W section
- Daily Scrum (2015/10/23)
- 2015年10月18日-10月24日作业:mairadb, vsftp, nfs, samb
- 创建maven项目时报错:Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4
- uva11029 - Leading and Trailing
- intel_rapl: no valid rapl domains found in package 0 virtualbox ubuntu
- ZOJ 2060----Fibonacci Again
- 《STL源码剖析》迭代器以及Traits设计
- aidl 中通过RemoteCallbackList 运用到的回调机制: service回调activity的方法
- 苹果AirPlay浅析
- 写博客之aim
- leetcode 125 Vaild Palindrome
- LeetCodeOJ_205_Submission Details