diff --git a/problems/0494.目标和.md b/problems/0494.目标和.md index 4993bede..07cf0433 100644 --- a/problems/0494.目标和.md +++ b/problems/0494.目标和.md @@ -321,7 +321,7 @@ const findTargetSumWays = (nums, target) => { const sum = nums.reduce((a, b) => a+b); - if(target > sum) { + if(Math.abs(target) > sum) { return 0; }