#C14694. Calculate Average Grades
Calculate Average Grades
Calculate Average Grades
This problem requires you to calculate the average grade for each student given a list of their grades. You will be given the number of students and for each student, their name, the number of grades they have, and the grades themselves.
The average should be computed as:
\( \text{average} = \frac{\text{sum of grades}}{\text{number of grades}} \)
Output the result with one decimal place for each student.
inputFormat
The input is read from standard input and is structured as follows:
- The first line contains a single integer \(N\) (1 ≤ N ≤ 100) representing the number of students.
- For each student, there are two lines:
- The first line contains the student's name (a single word) and an integer \(G\) (1 ≤ G ≤ 100) representing the number of grades.
- The second line contains \(G\) space-separated integers representing the grades.
outputFormat
For each student, output a single line in the following format:
name: average
The average must be printed with one decimal place.
## sample3
Alice 3
90 80 70
Bob 3
100 95 90
Charlie 3
80 85 90
Alice: 80.0
Bob: 95.0
Charlie: 85.0
</p>