首页 > 其他 > 详细

Sqrt(x)

时间:2015-04-18 11:26:52      阅读:126      评论:0      收藏:0      [点我收藏+]

Implement int sqrt(int x).

Compute and return the square root of x.

 

1 class Solution {
2 public:
3     int mySqrt(int x) {
4         return floor(sqrt(x*1.00));
5     }
6 };

 

Sqrt(x)

原文:http://www.cnblogs.com/amazingzoe/p/4436926.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!