Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution:
- """
- @param: : the given number
- @return: whether whether there're two integers
- """
- def checkSumOfSquareNumbers(self, num):
- import math
- if num < 0:
- return False
- if num == 0:
- return True
- root = int(math.sqrt(num))
- for i in range(0,root+1):
- j = math.sqrt(num - i*i)
- if j == int(j):
- return True
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement