Introduction - If you have any usage issues, please Google them yourself
July 17 is the birthday of Mr.W, ACM-THU do this want to make a volume of N* pi M-layer birthday cake, each layer is a cylinder.
Set number the bottom section i (1 <= i <= M) layer cake with a radius Ri, a cylindrical height of Hi. When i <M, the requirement Ri> Ri+ 1 and Hi> Hi+ 1.
Due to the cake rubbed cream, as much as possible to save funds, we hope the outer surface of the cake (the lowest layer of the underside of the exception) Q smallest area.
So that Q = S* pi
Please programming given N and M, find the cake production program (the appropriate value of Ri and Hi), the S minimum