{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"On July 17th, it\u0027s Mr. W\u0027s birthday, and ACM-THU wants to make a birthday cake with a volume of Nπ and M layers, each layer being a cylinder. \n\u003cbr\u003eLet\u0027s say the i-th (1 \u0026lt;\u003d i \u0026lt;\u003d M) layer from the bottom has a radius of Ri and a height of Hi. When i \u0026lt; M, it is required that Ri \u0026gt; Ri+1 and Hi \u0026gt; Hi+1. \n\u003cbr\u003eSince we need to spread butter on the cake, in order to save costs as much as possible, we hope to minimize the surface area Q of the cake (except for the bottom surface of the lowest layer). \n\u003cbr\u003eLet Q \u003d Sπ \n\u003cbr\u003ePlease write a program to find the values of Ri and Hi that minimize S, given N and M. \n\u003cbr\u003e(All data except for Q are positive integers) \n\u003cbr\u003e"}},{"title":"Input","value":{"format":"HTML","content":"There are two lines of input. The first line contains N (N \u0026lt;\u003d 10000), indicating the volume of the cake to be Nπ; the second line contains M (M \u0026lt;\u003d 20), indicating the number of layers M of the cake."}},{"title":"Output","value":{"format":"HTML","content":"Only one line, which is a positive integer S (if there is no solution, then S \u003d 0)."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e100\r\n2\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e68\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"Cylinder formulas \n\u003cbr\u003eVolume V \u003d πR\u003csup\u003e2\u003c/sup\u003eH \n\u003cbr\u003eLateral area A\u0027 \u003d 2πRH \n\u003cbr\u003eBase area A \u003d πR\u003csup\u003e2\u003c/sup\u003e \n\u003cbr\u003e"}}]}