题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1192

大水题,把m分成二的幂次方和。

 #include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(){
int m;
scanf("%d",&m);
int sum=,ans=;
while(){
ans++;
sum<<=;
if(m<sum){
printf("%d\n",ans);
return ;
}
}
}

最新文章

  1. redis教程(整理中)
  2. contains 方法
  3. MySQL------Navicat激活方法
  4. Similarity-based Learning
  5. thread_fork/join并发框架1
  6. [CareerCup] 9.10 Stack Boxes 垒箱子问题
  7. Eratosthenes筛选法求解质数
  8. 使用HTTP访问网络------使用HTTPURLConnection
  9. wamp集成环境开启虚拟主机多站点功能
  10. 【智能家居篇】wifi在智能家居中的应用
  11. POJ 1815 Friendship ★(字典序最小点割集)
  12. 关于SWT中的Combo类和List类
  13. ios专题 -动画
  14. Git配置安装使用教程操作github上传克隆数据
  15. jQuery读取JSON总结
  16. Python 文件的处理
  17. postgresql to_char 问题
  18. 【UR #7】水题走四方
  19. vs code配置
  20. 软件工程M1/M2总结

热门文章

  1. android &amp;lt;application&amp;gt; 开发文档翻译
  2. Android开发之自己定义Spinner样式的效果实现(源码实现)
  3. EJB学习笔记六(EJB中的拦截器)
  4. HDU 2457/POJ 3691 DNA repair AC自动机+DP
  5. caution
  6. Lightoj 1019 - Brush (V)
  7. POJ - 1330 Nearest Common Ancestors(dfs+ST在线算法|LCA倍增法)
  8. shinx索引部分源码分析——过程:连接到CSphSource对应的sql数据源,通过fetch row取其中一行,然后解析出field,分词,获得wordhit,最后再加入到CSphSource的Hits里
  9. bzoj 4543 HOTEL 加强版
  10. bzoj3668 [Noi2014]起床困难综合症——贪心