P9987 [CodeChef] kjcc08
NOI
题目描述

Clash of clans is a very popular game. Each player in the game is allocated a base with certain hit points the player can train a limited number of troops on the base. There are three types of troops: Barbarian, Archers and Giants. The Cost of training a Barbarian is 100, an Archer is 500, and a Giant is 1500. When attacking an opponent’s base, Barbarian can reduce 1 hit point per sec, Archer 2 hit points per sec and Giant 3 hit points per sec.

After training the troops, you attack a particular opponent’s base. The opponent’s base has certain hit points. To completely destroy the opponent base, your troop's total hit points should be equal or more than the opponent's base hit points keeping in mind that the opponent's base can heal itself N*15 (Where N is the size of the troops) hit points every min

Here, you will be given the size ’N’ of the army you can take, the hit points ’H’ of the opponent’s base, and the time ’T’ within which you need to destroy the opponents base.
Your task is to create a troop, which will destroy the opponent’s whole base within the given time limit with a MINIMUM COST.

Note: You need to consider all N troops for destroying the opponent base. Also the input will be such that it is possible to destroy the opponent's base using certain troops.

Input
The first line contains a single integer N which is the size of the army
The first line contains a single integer T which is the time limit
The first line contains a single integer H which is the hit point of opponent’s base

Output
A single line containing minimum cost of the army

Constraints

1 ≤ N ≤ 10^6
1 ≤ T ≤ 100
1 ≤ H ≤ 10^6

Example1:
Input:
9
2
1530
Output:
3300

Example2:
Input:
5
3
2475
Output:
7500

Example3:
Input:
3
1
60
Output:
300

Explanation

In Example 1: We have to take 9 troops, and we have got 2 mins to destroy i.e. 120 secs to destroy the whole base. And the hit points of the base are 1530. Including the healing effects (9215 = 270) the hit points of the opponent’s base is 1800. So the minimum cost army can be 6 Archers and 3 Barbarians, which cost 6500 +3100 =3300 which can destroy the whole base in 2 mins.
In Example 2: We have to take 5troops, and we have got 3 mins to destroy i.e. 180 secs to destroy the whole base. And the hit points of the base are 2475. Including the healing effects (5315 = 225) the hit points of the opponent’s base is 2700. So the minimum cost army can be all 5 Giants, which cost 5*1500=7500 which can destroy the whole base in 3 mins.

In Example 3: We have to take 3 troops, and we have got 1 mins to destroy i.e. 60 secs to destroy the whole base. And the hit points of the base are 60. Including the healing effects (3115 = 45) the hit points of the opponent’s base is 105. So the minimum cost army can be all 3 Barbarians, which cost 3*100 =300 which can destroy the whole base in 1 mins.

输入格式

见题面

输出格式

见题面

样例输入
3 1 60
样例输出
300