题解 | #求平方根#

求平方根

http://www.nowcoder.com/practice/09fbfb16140b40499951f55113f2166c

import java.util.*;

public class Solution {
    /**
     *
     * @param x int整型
     * @return int整型
     */
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        System.out.println();
        int input = sc.nextInt();
        sqrt(input);
    }
    public static int sqrt(int x) {
        int y = (int) Math.sqrt(x);
        System.out.println(y);
        return y;
    }
}
全部评论

相关推荐

未知的命运:大佬这都找不到我还找啥啊
点赞 评论 收藏
分享
09-17 19:25
已编辑
太原理工大学 游戏测试
叁六玖:公司名发我,我要这个HR带我打瓦
我的秋招日记
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务