1
# Runtime: 669 ms (Top 21.17%) | Memory: 13.8 MB (Top 63.98%)
2
import math
3

4

5
class Solution:
6
def judgeSquareSum(self, c: int) -> bool:
7

8
a = 0
9

10
while a**2 <= c:
11
b = math.sqrt(c - a**2)
12

13
if b.is_integer():
14
return True
15

16
a += 1
17

18
return False

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0