[BZOJ1192][HNOI2006]鬼谷子的钱袋 数学
2024-09-05 14:08:16
题目链接: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 ;
}
}
}
最新文章
- redis教程(整理中)
- contains 方法
- MySQL------Navicat激活方法
- Similarity-based Learning
- thread_fork/join并发框架1
- [CareerCup] 9.10 Stack Boxes 垒箱子问题
- Eratosthenes筛选法求解质数
- 使用HTTP访问网络------使用HTTPURLConnection
- wamp集成环境开启虚拟主机多站点功能
- 【智能家居篇】wifi在智能家居中的应用
- POJ 1815 Friendship ★(字典序最小点割集)
- 关于SWT中的Combo类和List类
- ios专题 -动画
- Git配置安装使用教程操作github上传克隆数据
- jQuery读取JSON总结
- Python 文件的处理
- postgresql to_char 问题
- 【UR #7】水题走四方
- vs code配置
- 软件工程M1/M2总结
热门文章
- android &;lt;application&;gt; 开发文档翻译
- Android开发之自己定义Spinner样式的效果实现(源码实现)
- EJB学习笔记六(EJB中的拦截器)
- HDU 2457/POJ 3691 DNA repair AC自动机+DP
- caution
- Lightoj 1019 - Brush (V)
- POJ - 1330 Nearest Common Ancestors(dfs+ST在线算法|LCA倍增法)
- shinx索引部分源码分析——过程:连接到CSphSource对应的sql数据源,通过fetch row取其中一行,然后解析出field,分词,获得wordhit,最后再加入到CSphSource的Hits里
- bzoj 4543 HOTEL 加强版
- bzoj3668 [Noi2014]起床困难综合症——贪心