As the cricket fever is on,you are given the task of calculating the run rate of a…
- User
As the cricket fever is on,you are given the task of calculating the run rate of a cricket match,but you are only provided with overs completed , current run rate and runs scored in next over.So you have to calculate the new run rate correctly upto two decimal places. Input
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows. The first line of each test case contains three space-separated integers O R S O denotes overs completed, R denotes current run rate and S denotes runs scored in next over.
Output Print the new run rate correctly upto two decimal places
Constraints
1 ≤ T ≤ 1000 1 ≤ O ≤ 50 1 ≤ R ≤ 36 1 ≤ S ≤ 36
Example Input: 1 16 6 8 Output: 6.12
Assistant
pythonT = int(input()) for _ in range(T): O, R, S = map(int, input().split()) total_runs = O * R + S total_overs = O + 1 new_rr = total_runs / total_overs print("{0:.2f}".format(new_rr))
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.