Lowest Bit
Lowest Bit
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)
Total Submission(s) : 34 Accepted Submission(s) : 17
#include <stdio.h>
#include <stdlib.h>
#include <string.h> int main()
{
int num,sign,i,j,k,K,sum;
char num_2[],NUM_2[];
while()
{
scanf("%d",&num);
if(num==)break;
itoa(num,num_2,);
sign=strlen(num_2);
for(i=sign-,j=;i>=;i--)
{
if(num_2[i]!='')
{
NUM_2[j]='';
j++;
}
else
{
NUM_2[]='';
NUM_2[j]='\0';
break; }
}
k=strlen(NUM_2);
for(i=,sum=;i<k;i++)
{
sum*=;
}
printf("%d\n",sum); }
return ;
}
Lowest Bit的更多相关文章
- [LeetCode] Lowest Common Ancestor of a Binary Tree 二叉树的最小共同父节点
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According ...
- [LeetCode] Lowest Common Ancestor of a Binary Search Tree 二叉搜索树的最小共同父节点
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BS ...
- 48. 二叉树两结点的最低共同父结点(3种变种情况)[Get lowest common ancestor of binary tree]
[题目] 输入二叉树中的两个结点,输出这两个结点在数中最低的共同父结点. 二叉树的结点定义如下: C++ Code 123456 struct BinaryTreeNode { int ...
- [LeetCode]Lowest Common Ancestor of a Binary Search Tree
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BS ...
- 数据结构与算法(1)支线任务4——Lowest Common Ancestor of a Binary Tree
题目如下:https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/ Given a binary tree, fin ...
- Lowest Common Ancestor of a Binary Search Tree
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BS ...
- Lowest Common Ancestor of a Binary Tree
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According ...
- leetcode 235. Lowest Common Ancestor of a Binary Search Tree
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BS ...
- leetcode 236. Lowest Common Ancestor of a Binary Tree
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According ...
- LeetCode 【235. Lowest Common Ancestor of a Binary Search Tree】
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BS ...
随机推荐
- ramfs/tmpfs: Linux RAM filesystems
Previously in windows, I uses ramdisk, to accelerate chrome browsing. However, in linux, this is mad ...
- mysql索引类型-形式-使用时机-不足之处--注意事项
一.索引的类型 1.普通索引 增加 create index index_name on table(colume(length)); 例子:cre ...
- 利用commons-io.jar包中FileUtils和IOUtils工具类操作流及文件
1.String IOUtils.toString(InputStream input),传入输入流对象,返回字符串,有多重重载,可按需要传参 用例: @Test public void showIn ...
- LogFactory缺包异常
抛出异常: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/loggin ...
- 在UE4中使用SVN作为source control工具
==========预先处理 1.到这个目录下 2.鼠标在空白处 按住shift键 同时右键 会多出一个 可以打开的cmd 3.输入命令,修改红线部分. me: 登陆svn地址的用户名, URL网址: ...
- oracle导入dmp数据库文件
要用sys账户登录数据库,创建和dmp文件一样的表空间名称 1. 创建表空间 例如: create tablespace test(表空间名称) datafile 'F:\oracle\oradata ...
- Java多线程:线程同步与关键字synchronized
一.同步的特性1. 不必同步类中所有的方法, 类可以同时拥有同步和非同步方法.2. 如果线程拥有同步和非同步方法, 则非同步方法可以被多个线程自由访问而不受锁的限制. 参见实验1:http://blo ...
- Quickly Start Listener scripts
#!/usr/bin/python # # StartListener.py # Simple python script to start a Meterpreter Listener # Auto ...
- Apple pay的使用
Apple pay的使用场景:1.app内:唯品会. 2.线下场景:万达 Apple pay的硬件要求:iphone6 以上 苹果婊 Apple pay的软件要求:国内(应该是)iOS9.2以上 ...
- Glusterfs[转]
原文地址:http://support.huawei.com/ecommunity/bbs/10253434.html 1. GlusterFS概述 GlusterFS是Scale-Out存 ...