P16208 [ECUSTPC 2025] Golden Corridor

Description

Maddy has arrived at ECUST University. Maddy walks into the legendary Lanqiao Cup laboratory. After hearing stories about several legendary contestants, she also wants to become one of them. But before that, she wants to study a practical problem. At this university, a team that wins one ICPC gold medal can apply for a bonus of $7500$ yuan. A team that wins one ICPC silver medal can apply for a bonus of $3000$ yuan. A team that wins one ICPC bronze medal can apply for a bonus of $1500$ yuan. ICPC is a contest where a team can have up to three members (it can also be a one-person team or a two-person team), and the bonus will be split equally among all team members. In Maddy’s dream, her team has $n$ contestants and wins $g$ gold medals, $s$ silver medals, and $b$ bronze medals. Please help her calculate how much bonus money she can get.

Input Format

One line contains 4 integers $n, g, s, b$ ($1 \le n \le 3, 0 \le g, s, b \le 7$), representing the number of people on Maddy’s team and the numbers of gold, silver, and bronze medals won. It is guaranteed that $g + s + b \le 7$.

Output Format

Output one integer $m$ in one line, representing the amount of bonus money Maddy gets (unit: yuan).

Explanation/Hint

### Sample 1 Explanation In this case, Maddy’s team wins two gold medals and gets $15000$ yuan, wins one silver medal and gets $3000$ yuan, and wins two bronze medals and gets $3000$ yuan, for a total of $21000$ yuan. After splitting equally, Maddy gets $7000$ yuan. ### Hint In programming contests, contestants usually do not need to, and should not, print any prompt text at the beginning of the program, including but not limited to text like “Please input two integers:”. Doing so may cause the submitted program to be judged Wrong Answer or lead to other unexpected judging results. Translated by ChatGPT 5