[Solution] Number of Credits CodeChef Solution
Problem
In the current semester, you have taken RTP courses, Audit courses and Non-RTP courses.
The credit distribution for the courses are:
- credits for clearing each RTP course.
- credits for clearing each Audit course.
- No credits for clearing a Non-RTP course.
Assuming that you cleared all your courses, report the number of credits you obtain this semester.
Input Format
The first line contains a single integer , the number of test cases. test cases follow. Each test case consists of one line, containing integers separated by spaces.
- The first integer is , the number of RTP courses.
- The second integer is , the number of Audit courses.
- The third integer is , the number of non-RTP courses.
Output Format
The output must consist of lines. The should consist of a single integer: the number of credits one gets for the test case.
Explanation:
Test case : You obtain credits for each of the RTP courses, accounting for credits. You also obtain credits for each audit course, accounting for credits. Finally, you get credits for each of the non-RTP courses, accounting for credits. This accounts for a total of credits.
Test case : You obtain credits for each of the RTP courses, accounting for credits. You also obtain credits for each audit course, accounting for credits. Finally, you get credits for each of the non-RTP courses, accounting for credits. This accounts for a total of credits.
Test case : You obtain credits for each of the RTP courses, accounting for credits. You also obtain credits for each audit course, accounting for credits. Finally, you get credits for each of the non-RTP courses, accounting for credits. This accounts for a total of credits.
Test case : You obtain credits for each of the RTP courses, accounting for credits. You also obtain credits for each audit course, accounting for credits. Finally, you get credits for each of the non-RTP courses, accounting for credits. This accounts for a total of credits.
No comments:
Post a Comment