摘要: 题意:求int32整数m和n的二进制表达,有多少个位(bit)不同么? public int countBitDiff(int m, int n) { int dif = m ^ n;//先将二者做异或运算,得到结果; int cnt = 0; while(dif != 0) { dif = dif 阅读全文
posted @ 2016-11-19 15:57 曹某某的博客 阅读(210) 评论(0) 推荐(0) 编辑
摘要: declare声明变量类型 declare [+ / -] [选项] 变量名 - :给变量设定类型属性 + :取消变量的类型属性 -a :将变量声明为数组型 -i :将变量声明为整数型 -x :将变量声明为环境变量 -r :将变量声明为只读变量 -p :显示指定变量的被声明的类型 数值运算的方法: 阅读全文
posted @ 2016-11-19 11:26 曹某某的博客 阅读(111) 评论(0) 推荐(0) 编辑