Submit | All submissions | Best solutions | Back to list |
EXERCISE - Exercise |
Sneha's physical trainer advised her to perform a exercise in order to maintain her fitness. She has been advised to start that exercise with 'a' minutes on the first day, then increasing it by 'k' minutes every day. After 'n' days she wanted to know about the total duration 's' of her exercise until nth day. You have to help her with this.
Input
Your program will be tested on one or more test cases. Each case is specified on a single line with three integers a, k, n where (0 <= a, k < 100) and (0 < n < 100). Input terminates with a = k = n = 0.
Output
For each test case, you have to print the line "Total minutes upto n days : s"
Example
Input: 2 1 2 5 2 4 0 0 0 Output: Total minutes upto 2 days : 5 Total minutes upto 4 days : 32
Added by: | Aditya Dixit |
Date: | 2013-09-03 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |