#Lutece0579. 积木
积木
Migrated from Lutece 579 积木
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
madoka小朋友最近在玩一堆积木。这堆积木都是圆柱体。现在madoka想把个积木堆成层体积为的物体。
为了让堆出来的这货看上去比较和谐,madoka规定堆在较下面的圆柱体的底面半径和高度都必须比上面的大。
现在madoka想把堆成物体的外表面涂色(不包括最下面一层底面),madoka想知道怎么来堆积木,才能使总涂色面积最小
假设所有积木的底面半径和高度均为正整数,且每种积木madoka都有无限个。
Input
有多组数据。每组数据包括两个正整数(, ),表示堆层,表示要求的体积为(是圆周率)。
Output
对每组数据输出一个正整数,表示最小面积为(是圆周率)。如果无解输出
Samples
100 2
68
Resources
UESTC Training for Search Algorithm