![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linkcode
poppy_rain
为天地立心为生民立命为往圣继绝学为万世开太平
展开
-
位操作 A+B问题
/** * A+B * @param a: An integer * @param b: An integer * @return: The sum of a and b * 进位操作和加操作分开,进位为0时结束 * 进位操作:同为1时进位1-----与(&)操作,再左移一位 * 加操作:异或 */ int aplusb(int a, int b) { ...原创 2018-02-10 17:00:30 · 157 阅读 · 0 评论 -
阶乘 尾部的零
. 尾部的零设计一个算法,计算出n阶乘中尾部零的个数样例11! = 39916800,因此应该返回 2 /** * 尾部的零 * @param n: An integer * @return: An integer, denote the number of trailing zeros in n! * * 1*2*3*...*n ...原创 2018-02-10 20:11:38 · 439 阅读 · 0 评论