#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

This is a bonus 30 mark question for those of you who are still stuck with many other problems and have given up and need some encouragement (: (:

Anyway, here is the problem description:

Little JiaLing once more is an avid MapleStory fan and wants to know the maximum damage he can deal to a monster. In this MapleStory, Little JiaLing will only play a Pirate character, who can only hold a gun or a knuckle.

The formula for calculating that is below:

Weapon Multiplier * ((4 * Primary Stat) + Secondary Stat) * (Attack / 100)

For a gun (G), the weapon multiplier is 1.6

For a knuckle (K), the weapon multiplier is 1.7.

Attack is based on the equipment he is wearing. He wears only 4 equipments that will give him attack, his weapon, his glove, his cape and his ring. The Attack is the sum of all these weapons.

## Input

The first line of input contains a character, representing the weapon he is using (G or K)The second line of input contains two integers, representing his Pimary Stat and Secondary Stat The third line of input contains four integers, representing the Attack given by the 4 equipments

## Output

Output the maximum damage Little JiaLing can hit to two decimal places.

To do that, do this before you output your double.

#include <iomanip> cout << fixed << setprecision(2);

## Sample Input 1

G100 30

80 10 1 5

## Sample Output 1

660.48This value is gotten from 1.6*(4*100+30)*((80+10+1+5)/100)

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 100 | 6 | 1s | 32MB | Average |

2 | 0 | 1 | 1s | 32MB | Average |

### Judge Compile Command

g++-8 ans.cpp -o maxdamage -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512