#K15466. Donation Summary

    ID: 24363 Type: Default 1000ms 256MiB

Donation Summary

Donation Summary

You are given a list of donation amounts. Your task is to compute two values:

  • Total Donation: The sum of all donation amounts.
  • Average Donation: The arithmetic average of the donations, rounded to the nearest integer. Formally, \(\text{average} = \text{round}\Big(\frac{\text{total}}{n}\Big)\), where \(n\) is the number of donations.

You need to read the input from stdin and output the results to stdout.

inputFormat

The input consists of two lines:

  1. The first line contains an integer \(n\) indicating the number of donations.
  2. The second line contains \(n\) space-separated integers representing the donation amounts.

outputFormat

Output two integers separated by a space. The first integer is the total donation and the second integer is the rounded average donation as described above.

## sample
5
100 200 300 400 500
1500 300

</p>