633. Sum of Square Numbers Medium
1/**
2 * [633] Sum of Square Numbers
3 *
4 * Given a non-negative integer c, decide whether there're two integers a and b such that a^2 + b^2 = c.
5 *
6 * Example 1:
7 *
8 * Input: c = 5
9 * Output: true
10 * Explanation: 1 * 1 + 2 * 2 = 5
11 *
12 * Example 2:
13 *
14 * Input: c = 3
15 * Output: false
16 *
17 *
18 * Constraints:
19 *
20 * 0 <= c <= 2^31 - 1
21 *
22 */
23pub struct Solution {}
24
25// problem: https://leetcode.com/problems/sum-of-square-numbers/
26// discuss: https://leetcode.com/problems/sum-of-square-numbers/discuss/?currentPage=1&orderBy=most_votes&query=
27
28// submission codes start here
29
30impl Solution {
31 pub fn judge_square_sum(c: i32) -> bool {
32 false
33 }
34}
35
36// submission codes end
37
38#[cfg(test)]
39mod tests {
40 use super::*;
41
42 #[test]
43 fn test_633() {
44 }
45}
46
Back
© 2025 bowen.ge All Rights Reserved.