633. Sum of Square Numbers

Medium

2.2K

521

Given a non-negative integer `c`

, decide whether there're two integers `a`

and `b`

such that `a`

.^{2} + b^{2} = c

**Example 1:**

Input:c = 5Output:trueExplanation:1 * 1 + 2 * 2 = 5

**Example 2:**

Input:c = 3Output:false

**Constraints:**

`0 <= c <= 2`

^{31}- 1

Accepted

172.7K

Submissions

503.3K

Acceptance Rate

34.3%

Seen this question in a real interview before?

1/4

Yes

No

Discussion (0)

Related Topics

Copyright ©️ 2023 LeetCode All rights reserved