Discus Throw Codechef Solution | MARCH CHALLENGE
Discus Throw Codechef Solution
In discus throw, a player is given 33 throws and the throw with the longest distance is regarded as their final score.
You are given the distances for all 33 throws of a player. Determine the final score of the player.
Input Format
- First line will contain TT, number of test cases. Then the test cases follow.
- Each test case contains of a single line of input, three integers A,B,A,B, and CC denoting the distances in each throw.
Output Format
For each test case, output the final score of the player.
Constraints
- 1≤T≤1001≤T≤100
- 1≤A,B,C≤1001≤A,B,C≤100
Sample Input 1
3
10 15 8
32 32 32
82 45 54
Sample Output 1
15
32
82
Explanation
Test Case 11: The longest distance is achieved in the second throw, which is equal to 1515 units. Thus, the answer is 1515.
Test Case 22: In all throws, the distance is 3232 units. Thus, the final score is 3232.
Test Case 33: The longest distance is achieved in the first throw which is equal to 8282 units. Thus, the answer is 8282.
Discus Throw Codechef SOLUTION
C++
Join our telegram group for codes.
Java
Will be Updated soon
Python
Will be Updated soon
Read More Post Here