#P8822. [传智杯 #3 初赛] 课程报名
[传智杯 #3 初赛] 课程报名
Description
Chuanzhi Podcast has launched a course and ran a promotion. Specifically, the course starts with a price of yuan; for every students who enroll, the course price increases by yuan. Since the course can only take a limited number of students, enrollment stops when the number of enrolled students reaches .
Now the teacher wants to know: when enrollment stops, how much tuition fee can be collected in total?
Input Format
One line with four integers separated by spaces: .
Output Format
One line with one integer, representing the answer.
5 1 1 1
15
Hint
Sample Explanation
For each course sold, the price increases by yuan, so the total revenue is yuan.
Constraints
For of the testdata, .
For an additional of the testdata, .
For of the testdata, .
However, since this contest uses the ACM format, you must pass of the testdata to get the score for this problem, and the same applies to the later problems.
Translated by ChatGPT 5
京公网安备 11011102002149号