sum of squared numbers

This commit is contained in:
Yudhvir Singh
2024-06-16 18:17:25 -07:00
parent 5d3dc86ec7
commit 50e29c9591
2 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
# 633. Sum of Square Numbers
Given a non-negative integer c, decide whether there're two integers a and b such that a2 + b2 = c.
Example 1:
Input: c = 5
Output: true
Explanation: 1 * 1 + 2 * 2 = 5
Example 2:
Input: c = 3
Output: false
Constraints:
0 <= c <= 231 - 1