1304 Find N Unique Integers Sum up to Zero
Given an integer n
, return any array containing n
unique integers such that they add up to 0
.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= n <= 1000
继续盲目找自信...这题不太难,嘛,简单题嘛。主要是loop结束条件要保证不会out of bound。
Last updated