摘要: 链接:https://leetcode-cn.com/problems/shu-zhi-de-zheng-shu-ci-fang-lcof/ 代码: class Solution { public: double myPow(double x, int n) { if(n == 0) return 阅读全文
posted @ 2020-02-20 20:57 景云ⁿ 阅读(159) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/er-jin-zhi-zhong-1de-ge-shu-lcof/submissions/ 代码: class Solution { public: int hammingWeight(uint32_t n) { int s = 阅读全文
posted @ 2020-02-20 20:48 景云ⁿ 阅读(96) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/jian-sheng-zi-ii-lcof/ 代码: class Solution { public: int cuttingRope(int n) { if(n < 4) return n - 1; long res = 1; 阅读全文
posted @ 2020-02-20 20:38 景云ⁿ 阅读(232) 评论(0) 推荐(0)