Total Prize Money Codechef Python Solution
In a coding contest, there are prizes for the top rankers. The prize scheme is as follows:
- Top participants receive rupees each.
- Participants with rank to (both inclusive) receive rupees each.
Find the total prize money over all the contestants.
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, two integers and - the prize for top rankers and the prize for ranks to respectively.
Output Format
For each test case, output the total prize money over all the contestants.
Total Prize Money Codechef Python Solution
Code
0 Comments