Find N Unique Integers Sum Zero Problem

Find N Unique Integers Sum Zero Problem — ExecCode School DSA Practice

Solve the Find N Unique Integers Sum Zero problem on ExecCode. Free online school DSA practice in Math. Write and run code in Java, C++, Python — no signup required to run.

Problem description

You are given a whole number N. Your task is to solve Find N Unique Integers Sum Zero. Make a list of N different whole numbers whose sum is 0, and print that list.

Examples

Input 1; Output 0. Input 2; Output -1 1

Constraints

1 <= n <= 10^5

Practice Find N Unique Integers Sum Zero free on ExecCode. Browse DSA problems, topic map, and placement guides.