Exemple #1
0
def sol() -> Solution:
    return Solution()
Exemple #2
0
def test_5_true(sol: Solution, ):
    assert sol.judge_square_sum(5) == True
Exemple #3
0
def test_999999999_false(sol: Solution, ):
    assert sol.judge_square_sum(999999999) == False
Exemple #4
0
def test_3_false(sol: Solution, ):
    assert sol.judge_square_sum(3) == False
Exemple #5
0
def test_27_false(sol: Solution, ):
    assert sol.judge_square_sum(27) == False
Exemple #6
0
def test_349_true(sol: Solution, ):
    assert sol.judge_square_sum(349) == True
 def test_judge_square_sum(self):
     inputs = (5, 3, 4, 2, 1)
     outs = (True, False, True, True, True)
     for inp, out in zip(inputs, outs):
         self.assertEqual(out, Solution().judgeSquareSum(inp))