int(sqrt(n)) * int(sqrt(n)) == n ? 1:0;

matlab 下判断一个数是否能开方的判断是:

floor(sqrt(m))^2 == m
posted on 2016-11-17 17:30  未雨愁眸  阅读(523)  评论(0)    收藏  举报