Skip to content

Commit b7f54a7

Browse files
committed
update
1 parent 4c2223b commit b7f54a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/sum-of-square-numbers.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Solution {
66
bool judgeSquareSum(int c) {
77
for (long long a = 0; a * a <= c; ++a) {
88
auto b = static_cast<int>(sqrt(c - a * a));
9-
if (c - a * a == b * b) {
9+
if (a * a + b * b == c) {
1010
return true;
1111
}
1212
}

0 commit comments

Comments
 (0)