Problem
Java
1
1 | class Solution { |
Submission Detail
- 124 / 124 test cases passed.
- Runtime: 242 ms, faster than 5.54% of Java online submissions for Sum of Square Numbers.
- Memory Usage: 37.6 MB, less than 14.48% of Java online submissions for Sum of Square Numbers.
2
1 | class Solution { |
Submission Detail
- 124 / 124 test cases passed.
- Runtime: 206 ms, faster than 7.18% of Java online submissions for Sum of Square Numbers.
- Memory Usage: 35.5 MB, less than 93.83% of Java online submissions for Sum of Square Numbers.
number theory
An integer greater than one can be written as a sum of two squares if and only if its prime decomposition contains no term \( p^k \), where prime \( p \equiv 3{\pmod {4}} \) and k is odd.
1 | class Solution { |
Submission Detail
- 124 / 124 test cases passed.
- Runtime: 0 ms, faster than 100.00% of Java online submissions for Sum of Square Numbers.
- Memory Usage: 35.7 MB, less than 74.91% of Java online submissions for Sum of Square Numbers.