Discus Throw Solution | Discus Throw Problem Code Solution | Discus Throw Problem Code: DISCUSS Solution
Discus Throw Problem Code: DISCUSS
In discus throw, a player is given throws and the throw with the longest distance is regarded as their final score.
You are given the distances for all throws of a player. Determine the final score of the player.
Input Format
- First line will contain , number of test cases. Then the test cases follow.
- Each test case contains of a single line of input, three integers and denoting the distances in each throw.
Output Format
For each test case, output the final score of the player.
Constraints
Sample Input 1
3
10 15 8
32 32 32
82 45 54
Sample Output 1
15
32
82
Explanation
Test Case : The longest distance is achieved in the second throw, which is equal to units. Thus, the answer is .
Test Case : In all throws, the distance is units. Thus, the final score is .
Test Case : The longest distance is achieved in the first throw which is equal to units. Thus, the answer is .
Discus Throw Solution | Discus Throw Problem Code Solution | Discus Throw Problem Code: DISCUSS Solution
Reviewed by •∆•HACKER'S ON•∆•
on
March 11, 2022
Rating:
No comments: