#P5744. Student Training Simulation

    ID: 18972 Type: Default 1000ms 256MiB

Student Training Simulation

Student Training Simulation

This problem simulates a training process for a group of students. Each student has the following information:

  • Name (a string)
  • Age (an integer, in years)
  • Last year's NOIP score (an integer which is guaranteed to be a multiple of \(5\))

After one year of training, each student's score is improved by \(20\%\). However, since the maximum NOIP score is \(600\), if the improved score exceeds \(600\), it will be capped at \(600\). The simulation is performed by a function that takes a student structure as input, returns a modified student structure with the updated score, and the program then outputs each student's information.

The score update is calculated using the formula:

\[ \text{new_score} = \min(600, \text{last_score} \times 1.2)\]

inputFormat

The first line of input contains an integer \(n\) representing the number of students.

Each of the following \(n\) lines contains three space-separated values: the student's name (a string), age (an integer), and last year's NOIP score (an integer that is a multiple of \(5\)).

outputFormat

Output \(n\) lines. Each line should contain the student's name, age, and updated score (after the 20% increase, with a maximum of 600), separated by a space.

sample

1
Alice 20 400
Alice 20 480