Banner Home Page DIY Contests Problems Ranklist Status Statistics
请将1011题目交到1018上。

Problem A

Time Limit : 3000/1000ms (Java/Other)   Memory Limit : 65535/32768K (Java/Other)
Total Submission(s) : 29   Accepted Submission(s) : 10

Font: Times New Roman | Verdana | Georgia

Font Size:

Problem Description

It is said that Wechat(weixin) will release a new game called “tian tian fei che”. It is also said that in this game, when the whole run time is X second, the oil you spend is A-B*X (50>A>0,50>B>0)
The price of this oil is B^X (we account it in the end)
So it seems that you will cost X*(A-B*X)*B^X in this journey.
One day tu hao began to paly this game. But he want to dispaly the money he cost in the “circle of freind” on Wechat. He want to show that he spend the most money. So how can he spend the most money. Can you help him?(X could not be an integer)

Input

There will be many cases. Each case will have two integers A and B indicating the parameters in the formula.

Output

Out put the maximum cost in the journey. rounded to 3 digitsafter decimal point.

Sample Input

25 20

Sample Output

100.000

Statistic | Submit | Back