367. Valid Perfect Square
Given a positive integer num, write a function which returns True if num is a perfect square else False.
题目含义:判断一个数能否被开方
1 public boolean isPerfectSquare(int num) { 2 for (int i = 1; i <= num / i; ++i) { 3 if (i * i == num) return true; 4 } 5 return false; 6 }