Python 3


  • 0
    G

    class Solution:
    def isPerfectSquare(self, num):
    """
    :type num: int
    :rtype: bool
    """
    for x in range(0,100000):
    if x*x == num:
    return True
    return False


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.