hdoj 1196 Lowest Bit(水题)
来源:互联网 发布:淘宝店铺装修图片链接 编辑:程序博客网 时间:2024/05/29 14:42
思路:直接给代码
代码如下:
#include <iostream> #include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include <algorithm>#include <vector>using namespace std;int main(){ int n; int a[20]; int i; int x; while(scanf("%d",&n)&& n) { x=0; while(n) { a[x++]=n%2; n/=2;}for(i=0;i<x;i++){if(a[i]!=0)break;}printf("%d\n",(int)pow(2,i));} return 0; }
阅读全文
0 0
- hdoj 1196 Lowest Bit(水题)
- HDOJ 1196 Lowest Bit(水题)
- hdoj 1196 Lowest Bit
- 【HDOJ】1196 -> Lowest Bit
- HDOJ 1196 Lowest Bit
- hdoj 1196 Lowest Bit
- HDOJ 1196 Lowest Bit
- hdoj 1196 Lowest Bit
- Hdoj 1196 Lowest Bit 【&】
- hdoj.1196 Lowest Bit 20140815
- hdoj 1196 Lowest Bit (二进制)
- HDOJ 1196 Lowest Bit(树状数组实现)
- hdu 1196 Lowest bit (水题)
- hdu 1196(Lowest Bit)
- HDOJ 1196:Lowest Bit——用位操作求解
- HDOJ 1196 Lowest Bit(二进制相关的简单题)
- 杭电OJ——1196 Lowest Bit(水题)
- 杭电acm水题 1196 Lowest Bit
- Castle.Windsor 在MVC与WebApi中如何进行IOC
- Java语言程序设计基础篇第四章课后习题(保持更新)
- 发布接口
- c++ 快速排序
- 湘潭大学2017年下学期程序设计实践-模拟测试3 题解
- hdoj 1196 Lowest Bit(水题)
- Oracle本地客户端与Oracle虚拟机服务器的安装
- tensorflow(五)---Word2vec
- 机器学习API文档(演示) (二)无监督学习
- 编辑器
- Python 各种转义字符
- c++ MFC模拟笔记本键盘测试
- 算法-Hanoi塔问题+递归
- 比特币的前世今生