leetcode367】的更多相关文章

Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library function such as sqrt. Example 1: Input: 16 Output: true Example 2: Input: 14 Output: false 给定一个正整数 num,编写一…
public class Solution { public bool IsPerfectSquare(int num) { , high = num; while (low <= high) { ; if (mid * mid == num) { return true; } else if (mid * mid < num) { low = (; } else { high = (; } } return false; } } https://leetcode.com/problems/v…