Several friends are participating in a javelin competition. Each participant gets 6 attempts, and for each attempt the distance of the javelin throw is measured. The final score of each participant equals the distance of the longest attempt. An invalid attempt results in a distance of 0.
Input
The input starts with an integer N, the number of participants. On each of the following N lines is the name of a participant (as a single word) and the result of this participant’s six attempts. The result of each attempt is a real number with two decimal places (representing the distance of the throw in meters and centimeters), or 0 if the attempt was invalid.
Output
For each participant, output their final score on a separate line on the following format, where X is the name:
X: YY.YY
Hint: Use "std::setprecision" in the <iomanip> library to print a fixed number of decimal places:
std::cout << std::setprecision( 2 ) << std::fixed << result;
Input
4 John 62.39 0 45.23 0 65.14 68.99 Emily 67.12 60.02 0 55.78 66.41 0 Richard 58.12 55.17 59.92 0 52.92 56.55 Jennie 59.12 0 0 0 55.12 60.01
Output
John: 68.99 Emily: 67.12 Richard: 59.92 Jennie: 60.01