I Am a Chef
InterviewTime limit1sMemory limit128 MB
Given four scores each for five contestants, output the number and total score of the contestant with the highest sum.
- Level
Easy2 of 10
- Topics
- Array, Implementation
- Solved
- No attempts yet
Problem
"I Am a Chef" is a television program where five contestants evaluate one another's cooking. Each contestant brings one dish, and the other contestants score it from 1 to 5.
A contestant's total score is the sum of the four scores they received. The winner is the contestant with the highest total score, and the input always has exactly one winner.
Given the five contestants' scores, find the winner's number and total score.
Input
Five lines are given. Each line contains four space-separated scores received by one contestant.
The lines are given in order from contestant 1 to contestant 5. Each score is an integer from 1 to 5, and the winner is always unique.
Output
Print the winner's number and the winner's total score, separated by a space.