
牛顿迭代法
文章平均质量分 72
jmspan
这个作者很懒,什么都没留下…
展开
-
LeetCode 69. Sqrt(x)(开平方根)
原题网址:https://leetcode.com/problems/sqrtx/ Implement int sqrt(int x). Compute and return the square root of x. 方法一:二分法。 public class Solution { public int mySqrt(int x) { int i=0,原创 2016-05-22 00:05:17 · 2030 阅读 · 0 评论 -
LeetCode 441. Arranging Coins
原题网址:https://leetcode.com/problems/arranging-coins/ You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. Given n, find the to原创 2016-11-19 03:19:43 · 841 阅读 · 0 评论