#P11118. Drone Transmission Calculation

    ID: 13177 Type: Default 1000ms 256MiB

Drone Transmission Calculation

Drone Transmission Calculation

In a drone competition, transmissions are an energy‐consuming process. In order to prepare for the competition, you need to know the total number of transmissions performed by all drones before the competition ends. Let \(c_k\) denote the total number of transmissions when \(k\) drones take part in the competition. You are required to compute \(c_1, c_2, \dots, c_n\) where

[ c_k = \frac{k \times (k-1)}{2} ]

For example, when there is only 1 drone, \(c_1 = 0\); when 2 drones participate, \(c_2 = 1\); when 3 drones participate, \(c_3 = 3\), and so on.

The input consists of a single integer \(n\). The output should contain \(n\) integers \(c_1, c_2, \dots, c_n\) separated by spaces.

inputFormat

The input consists of a single integer \(n\) (\(1 \leq n \leq 10^6\)).

outputFormat

Output \(n\) space-separated integers: \(c_1, c_2, \dots, c_n\), where \(c_k\) is the total number of transmissions performed by the drones when \(k\) drones participate.

sample

1
0