#C14654. Student Grade Classification and Database Storage

    ID: 44327 Type: Default 1000ms 256MiB

Student Grade Classification and Database Storage

Student Grade Classification and Database Storage

You are given records of students where each record contains the student's name, age, and a list of grades. Your task is to classify each student as Pass if their average grade is at least 60 and Fail otherwise. The average grade is computed using the formula: $$ \bar{x} = \frac{\sum_{i=1}^{n} x_i}{n} $$.

In addition to classifying the students, you are required to save each student's name, calculated average grade, and classification into a database. In actual implementations, this would involve calling a function that interacts with an SQLite database. For the purpose of this problem, the database saving function can be simulated as a dummy operation in languages without native SQLite support.

inputFormat

The input is given via standard input (stdin) with the following format:

  • The first line contains an integer n representing the number of students.
  • Each of the following n lines describes one student in the format:
    Name Age k Grade1 Grade2 ... Gradek

For example: Alice 20 3 70 80 90 represents a student named Alice, aged 20, with 3 grades: 70, 80, and 90.

outputFormat

The output should be printed to standard output (stdout). For each student, output one line containing the student's name and their classification (Pass or Fail), separated by a single space.

## sample
1
Alice 20 3 70 80 90
Alice Pass

</p>