摘要: 题目描述: Implement int sqrt(int x). Compute and return the square root of x. 实现开根号,并且返回整数值(这个很重要,不是整数的话就有一种方法用不了了) 方法一:二分法,另外由于我们知道开根号的结果肯定小于等于这个数的二分之一,所 阅读全文
posted @ 2014-04-22 00:42 mrbean 阅读(412) 评论(0) 推荐(0) 编辑