#C1889. Compute Marmot Population Net Changes

    ID: 45143 Type: Default 1000ms 256MiB

Compute Marmot Population Net Changes

Compute Marmot Population Net Changes

During a study period, each village experiences daily fluctuations in its marmot population due to migrations. Given the number of villages V and the number of days D, together with the migration data represented as a matrix, your task is to calculate the net change in the marmot population for each village over the entire period.

For each village i (1 ≤ i ≤ V), the net change is given by:

\( netChange_i = \sum_{d=1}^{D} migration_{d,i} \)

Where migrationd,i is the migration value of village i on day d. Provide the net changes as space-separated integers in one line.

inputFormat

The input is read from stdin and has the following format:

  • The first line contains two integers V and D separated by a space, representing the number of villages and the number of days respectively.
  • The next D lines each contain V space-separated integers. The j-th number in the i-th line represents the migration change for village j on day i.

outputFormat

Output a single line to stdout containing V integers separated by spaces. Each integer represents the net change in population for the corresponding village over the entire study period.

## sample
1 1
10
10

</p>